]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/lalr.h (LA): Is a bitsetv, not bitset*.
[bison.git] / ChangeLog
CommitLineData
e601aa1d
AD
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4
5
b0299a2e
AD
62002-04-07 Akim Demaille <akim@epita.fr>
7
8 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
9 (LArule): this, which is an array to rule_t*.
10 * src/print.c, src/conflicts.c: Adjust.
11
12
d7e1f00c
AD
132002-04-07 Akim Demaille <akim@epita.fr>
14
15 * src/gram.h (rule_t): Rename `number' as `user_number'.
16 `number' is a new member.
17 Adjust dependencies.
18 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19
cc9305dd
AD
202002-04-07 Akim Demaille <akim@epita.fr>
21
22 As a result of the previous patch, it is no longer needed
23 to reorder ritem itself.
24
25 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
26
b0940840
AD
272002-04-07 Akim Demaille <akim@epita.fr>
28
29 Be sure never to walk through RITEMS, but use only data related to
30 the rules themselves. RITEMS should be banished.
31
32 * src/output.c (output_token_translations): Rename as...
33 (prepare_tokens): this.
34 In addition to `translate', prepare the muscles `tname' and
35 `toknum', which were handled by...
36 (output_rule_data): this.
37 Remove, and move the remainder of its outputs into...
38 (prepare_rules): this new routines, which also merges content from
39 (output_gram): this.
40 (prepare_rules): Be sure never to walk through RITEMS.
41 (output_stos): Rename as...
42 (prepare_stos): this.
43 (output): Always invoke prepare_states, after all, just don't use it
44 in the output if you don't need it.
45
643a5994
AD
462002-04-07 Akim Demaille <akim@epita.fr>
47
48 * src/LR0.c (new_state): Display `nstates' as the name of the
49 newly created state.
50 Adjust to initialize first_state and last_state if needed.
51 Be sure to distinguish the initial from the final state.
52 (new_states): Create the itemset of the initial state, and use
53 new_state.
54 * src/closure.c (closure): Now that the initial state has its
55 items properly set, there is no need for a special case when
56 creating `ruleset'.
57
58 As a result, now the rule 0, reducing to $axiom, is visible in the
59 outputs. Adjust the test suite.
60
61 * tests/conflicts.at (Solved SR Conflicts)
62 (Unresolved SR Conflicts): Adjust.
63 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
64 * tests/conflicts.at (S/R in initial): New.
65
b4c4ccc2
AD
662002-04-07 Akim Demaille <akim@epita.fr>
67
68 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
69 the RHS of the rules.
70 * src/output.c (output_gram): Likewise.
71
bba97eb2
AD
722002-04-07 Akim Demaille <akim@epita.fr>
73
74 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
75 bucket.
76 Adjust all dependencies.
77 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
78 `number' of the buckets too.
79 * src/gram.h: Include `symtab.h'.
80 (associativity): Move to...
81 * src/symtab.h: here.
82 No longer include `gram.h'.
83
84
c3b407f4
AD
852002-04-07 Akim Demaille <akim@epita.fr>
86
87 * src/gram.h, src/gram.c (rules_rhs_length): New.
88 (ritem_longest_rhs): Use it.
89 * src/gram.h (rule_t): `number' is a new member.
90 * src/reader.c (packgram): Set it.
91 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
92 the end of `rules', and count them out of `nrules'.
93 (reduce_output, dump_grammar): Adjust.
94 * src/print.c (print_grammar): It is no longer needed to check for
95 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
96 * tests/reduce.at (Reduced Automaton): New test.
97
11652ab3
AD
982002-04-07 Akim Demaille <akim@epita.fr>
99
100 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
101 lacking `+ 1' to nrules, Bison reported as useless a token if it
102 was used solely to set the precedence of the last rule...
103
26b23c1a
AD
1042002-04-07 Akim Demaille <akim@epita.fr>
105
106 * data/bison.c++, data/bison.simple: Don't output the current file
107 name in #line, to avoid useless diffs between two identical
108 outputs under different names.
109
18bcecb0
AD
1102002-04-07 Akim Demaille <akim@epita.fr>
111
112 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
113 Normalize loops to using `< nrules + 1', not `<= nrules'.
114
fa770c86
AD
1152002-04-07 Akim Demaille <akim@epita.fr>
116
117 * TODO: Update.
118
d9b739c3
AD
1192002-04-07 Akim Demaille <akim@epita.fr>
120
121 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
122 bucket.value as bucket.number.
123
99013900
AD
1242002-04-07 Akim Demaille <akim@epita.fr>
125
126 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
127 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
128 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
129 RHS, instead of being an index in RITEMS.
130
e966383b
PE
1312002-04-04 Paul Eggert <eggert@twinsun.com>
132
133 * doc/bison.texinfo: Update copyright date.
134 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
135 (Symbols): Warn about running Bison in one character set,
136 but compiling and/or running in an incompatible one.
137 Warn about character code 256, too.
138
1392002-04-03 Paul Eggert <eggert@twinsun.com>
140
141 * src/bison.data (YYSTACK_ALLOC): Depend on whether
142 YYERROR_VERBOSE is nonzero, not whether it is defined.
143
144 Merge changes from bison-1_29-branch.
c307773e 145
8d6c48b9
PE
1462002-03-20 Paul Eggert <eggert@twinsun.com>
147
148 Merge fixes from Debian bison_1.34-1.diff.
149
150 * configure.in (AC_PREREQ): 2.53.
151
e53c6322
AD
1522002-03-20 Akim Demaille <akim@epita.fr>
153
154 * src/conflicts.c (log_resolution): Argument `resolution' is const.
155
9ffbeca7
PE
1562002-03-19 Paul Eggert <eggert@twinsun.com>
157
21db0b2a
PE
158 * src/bison.simple (YYCOPY): New macro.
159 (YYSTACK_RELOCATE): Use it.
160 Remove Type arg; no longer needed. All callers changed.
161 (yymemcpy): Remove; no longer needed.
162
9ffbeca7
PE
163 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
164 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
165
642cb8f8
AD
1662002-03-19 Akim Demaille <akim@epita.fr>
167
168 Test and fix the #line outputs.
169
170 * tests/atlocal.at (GCC): New.
171 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
172 (Prologue synch line, ,%union synch line, Postprologue synch line)
173 (Action synch line, Epilogue synch line): New tests.
174 * src/reader.c (parse_union_decl): Define the muscle stype_line.
175 * data/bison.simple, data/bison.c++: Use it.
176
3c31a486
AD
1772002-03-19 Akim Demaille <akim@epita.fr>
178
179 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
180 (Solved SR Conflicts, %expect not enough, %expect right)
181 (%expect too much): Move to...
182 * tests/conflicts.at: this new file.
183
0d8bed56
AD
1842002-03-19 Akim Demaille <akim@epita.fr>
185
186 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
187 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
188 that we can move to enums for instance.
189 * src/output.c (token_definitions_output): Output a list of
190 `token-name, token-number' instead of the #define.
191 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
192
9208d17f
AD
1932002-03-14 Akim Demaille <akim@epita.fr>
194
195 Use Gettext 0.11.1.
196
af27eacb
RA
1972002-03-09 Robert Anisko <robert@lrde.epita.fr>
198
199 * data/bison.c++: Make the user able to add members to the generated
200 parser by subclassing.
201
9101a310
RA
2022002-03-05 Robert Anisko <robert@lrde.epita.fr>
203
204 * src/reader.c (read_additionnal_code): `c' should be an integer, not
205 a character.
206 Reported by Nicolas Tisserand and Nicolas Burrus.
207
fff9bf0b
RA
2082002-03-04 Robert Anisko <robert@lrde.epita.fr>
209
210 * src/reader.c: Warn about lacking semi-colons, do not complain.
211
64dba31e
RA
2122002-03-04 Robert Anisko <robert@lrde.epita.fr>
213
214 * data/bison.c++: Remove a debug line.
215
374f5a14
RA
2162002-03-04 Robert Anisko <robert@lrde.epita.fr>
217
218 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
219 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
220 provide a default implementation.
221
bfcf1f3a
AD
2222002-03-04 Akim Demaille <akim@epita.fr>
223
224 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
225 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
226 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
227 * tests/semantic.at (Parsing Guards): Similarly.
228 * src/reader.at (readgram): Complain if the last rule is not ended
229 with a semi-colon.
230
65ccf9fc
AD
2312002-03-04 Akim Demaille <akim@epita.fr>
232
233 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
234 * src/closure.c: here.
235 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
236 RTC.
237 * src/warshall.h, src/warshall.c: Remove.
238 * tests/sets.at (Broken Closure): Adjust.
239
d0039cbc
AD
2402002-03-04 Akim Demaille <akim@epita.fr>
241
242 * src/output.c (output_skeleton): tempdir is const.
243 bytes_read is unused.
244
345cea78
AD
2452002-03-04 Akim Demaille <akim@epita.fr>
246
247 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
248 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
249 Update.
250 From Michael Hayes.
251
564801f7
AD
2522002-03-04 Akim Demaille <akim@epita.fr>
253
254 * src/closure.c (closure): `r' is unused.
255
e5352bc7
AD
2562002-03-04 Akim Demaille <akim@epita.fr>
257
258 * tests/sets.at (Broken Closure): Add the ending `;'.
259 * src/reader.at (readgram): Complain if a rule is not ended with a
260 semi-colon.
261
914feea9
AD
2622002-03-04 Akim Demaille <akim@epita.fr>
263
264 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
265 (count_sr_conflicts): Use bitset_count.
266 * src/reduce.c (inaccessable_symbols): Ditto.
267 (bits_size): Remove.
268 * src/warshall.h, src/warshall.c: Convert to bitsetv.
269
f0250de6
AD
2702002-03-04 Akim Demaille <akim@epita.fr>
271
272 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
273 * src/reduce.c: Remove the `bitset_zero's following the
274 `bitset_create's, as now it is performed by the latter.
275
ef017502
AD
2762002-03-04 Akim Demaille <akim@epita.fr>
277
278 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
279 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
280 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
281 latest sources from Michael.
282
76514394
AD
2832002-03-04 Akim Demaille <akim@epita.fr>
284
285 * src/output.c (output): Don't free the grammar.
286 * src/reader.c (grammar_free): New.
287 * src/main.c (main): Call it and don't free symtab here.
288
55024580
AD
2892002-03-04 Akim Demaille <akim@epita.fr>
290
291 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
292 before returning.
293 Reported by Benoit Perrot.
294
f9abaa2c
AD
2952002-03-04 Akim Demaille <akim@epita.fr>
296
297 Use bitset operations when possible, not loops over bits.
298
299 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
300 bitset_or.
301 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
302 * src/reduce.c (useless_nonterminals): Formatting changes.
303 * src/warshall.c (TC): Use bitset_or.
304
0e721e75
AD
3052002-03-04 Akim Demaille <akim@epita.fr>
306
307 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
308 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
309 Ditto.
310
0fb1ffb1
AD
3112002-03-04 Akim Demaille <akim@epita.fr>
312
313 * src/lalr.c (F): Now a bitset*.
314 Adjust all dependencies.
315
b86796bf
AD
3162002-03-04 Akim Demaille <akim@epita.fr>
317
318 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
319 Adjust all dependencies.
320
602bbf31
AD
3212002-03-04 Akim Demaille <akim@epita.fr>
322
323 * src/L0.c, src/LR0.h (nstates): Be size_t.
324 Adjust comparisons (signed vs unsigned).
325 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
326 bitset*.
327 Adjust all dependencies.
328
d8a0245c
AD
3292002-03-04 Akim Demaille <akim@epita.fr>
330
331 * src/closure.c (firsts): Now, also a bitset.
332 Adjust all dependencies.
333 (varsetsize): Remove, now unused.
334 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
335
34ba9743
AD
3362002-03-04 Akim Demaille <akim@epita.fr>
337
338 * src/print.c: Convert to use bitset.h, not hand coded iterations
339 over ints.
340
ed86e78c
AD
3412002-03-04 Akim Demaille <akim@epita.fr>
342
343 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
344
dfdb1797
AD
3452002-03-04 Akim Demaille <akim@epita.fr>
346
347 * src/closure.c (ruleset): Be a bitset.
348 (rulesetsize): Remove.
349
7086e707
AD
3502002-03-04 Akim Demaille <akim@epita.fr>
351
352 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
353 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
354 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
355 * src/closure.c (fderives): Be an array of bitsets.
356
98254360
RA
3572002-02-28 Robert Anisko <robert@lrde.epita.fr>
358
359 * data/bison.c++: Merge the two generated headers. Insert a copyright
360 notice in each output file.
361
a75c057f
AD
3622002-02-28 Akim Demaille <akim@epita.fr>
363
364 * data/bison.c++: Copy the prologue of bison.simple to fetch
365 useful M4 definitions, such as b4_header_guard.
366
06b00abc
AD
3672002-02-25 Akim Demaille <akim@epita.fr>
368
369 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
370 translator friendly scheme for the bgr
371 copyright notice.
06b00abc 372
70e7d534
AD
3732002-02-25 Akim Demaille <akim@epita.fr>
374
375 * src/output.c (header_output): Remove, now handled completely via
376 M4.
377
abe017f6
AD
3782002-02-25 Akim Demaille <akim@epita.fr>
379
380 * m4/m4.m4: New, from CVS Autoconf.
381 * configure.in: Invoke it.
382 * src/output.c (output_skeleton): Use its result instead of the
383 hard coded name.
384
381fb12e
AD
3852002-02-25 Akim Demaille <akim@epita.fr>
386
387 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
388 Fileutils 4.1.5.
389 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
390 * src/output.c (output_skeleton): Use mkstemp to create a real
391 temporary file.
392 Move the filling of `skeleton' and its muscle to...
393 (prepare): here.
394 (output): Move the definition of the prologue muscle to...
395 (prepare): here.
396 * src/system.h (DEFAULT_TMPDIR): New.
397
6f38107f
PE
3982002-02-14 Paul Eggert <eggert@twinsun.com>
399
400 Remove the support for C++ namespace cleanliness; it was
401 causing more problems than it was curing, since it didn't work
402 properly on some nonstandard C++ compilers. This can wait
403 for a proper C++ parser.
404
405 * NEWS: Document this.
406 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
407 of C++, as it's treated like C now.
408 * src/bison.simple (YYSTD): Remove.
409 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
410 Treat C++ just like Standard C instead of trying to support
411 namespace cleanliness.
412
80cce3da
AD
4132002-02-14 Akim Demaille <akim@epita.fr>
414
415 * tests/regression.at (else): Adjust to Andreas' change.
416
842e8679
AD
4172002-02-14 Akim Demaille <akim@epita.fr>
418
419 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
420
4bda3f10
AD
4212002-02-13 Andreas Schwab <schwab@suse.de>
422
423 * src/output.c (output_rule_data): Don't output NULL, it might
424 not be defined yet.
425
4162fa07 4262002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 427
4162fa07
RA
428 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
429 (Copyright notice): Update.
b418ecd8 430
bd16a5dc
AD
4312002-02-11 Akim Demaille <akim@epita.fr>
432
433 * tests/regression.at (%nonassoc and eof): Don't include
434 nonportable headers.
435
8d69a1a3
RA
4362002-02-08 Robert Anisko <robert@lrde.epita.fr>
437
438 * data/bison.c++: Correct error recovery. Make the user able to
439 initialize the starting location.
440
9b2d0677
AD
4412002-02-07 Akim Demaille <akim@epita.fr>
442
443 * tests/input.at: New.
444
69e2658b
RA
4452002-02-07 Robert Anisko <robert@lrde.epita.fr>
446
447 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 448 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
449 directives around tables only needed for debugging.
450
4aacc3a7
RA
4512002-02-07 Robert Anisko <robert@lrde.epita.fr>
452
453 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
454 C++ parsers.
455 (yy::b4_name::parse): Use print_.
456
762a801e
RA
4572002-02-07 Robert Anisko <robert@lrde.epita.fr>
458
459 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
460
4bb2bc3f
RA
4612002-02-07 Robert Anisko <robert@lrde.epita.fr>
462
463 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
464 C++ parsers.
465 (yy::b4_name::parse): Build verbose error messages, and use error_.
466
6b45a3ca
RA
4672002-02-06 Robert Anisko <robert@lrde.epita.fr>
468
469 * data/bison.c++: Fix m4 quoting in comments.
470
50997c6e
RA
4712002-02-06 Robert Anisko <robert@lrde.epita.fr>
472
473 * data/bison.c++: Adjust the parser code. Fix some muscles that were
474 not expanded by m4.
475
3f3eed27
AD
4762002-02-05 Akim Demaille <akim@epita.fr>
477
478 * data/bison.c++: Adjust to the M4 back end.
479 More is certainly needed.
480
be2a1a68
AD
4812002-02-05 Akim Demaille <akim@epita.fr>
482
483 Give a try to M4 as a back end.
484
485 * lib/readpipe.c: New, from wdiff.
486 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
487 BISON_HAIRY.
488 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
489 specific values. Now it is m4 that performs the lookup.
490 * src/parse-skel.y: Remove.
491 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
492 * src/output.c (actions_output, guards_output)
493 (token_definitions_output): No longer keeps track of the output
494 line number, hence remove the second argument.
495 (guards_output): Check against the guard member of a rule, not the
496 action member.
497 Adjust callers.
498 (output_skeleton): Don't look for the skeleton location, let m4 do
499 that.
500 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
501 file will be used.
502 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
503 (prepare): Given that for the time being changesyntax is not
504 usable in M4, rename the muscles using `-' to `_'.
505 Define `defines_flag', `output_parser_name' and `output_header_name'.
506 * src/output.h (actions_output, guards_output)
507 (token_definitions_output): Adjust prototypes.
508 * src/scan-skel.l: Instead of scanning the skeletons, it now
509 processes the output of m4: `__oline__' and `#output'.
510 * data/bison.simple: Adjust to be used by M4(sugar).
511 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
512 to date.
513 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
514 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
515 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
516 shamelessly stolen from CVS Autoconf.
517
beda758b
AD
5182002-02-05 Akim Demaille <akim@epita.fr>
519
520 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
521 * configure.in: Check for the declarations of free and malloc.
522 * src/muscle_tab.c: Adjust.
523
5ece6d43
AD
5242002-02-05 Akim Demaille <akim@epita.fr>
525
526 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
527 which have no values.
528
5bb18f9a
AD
5292002-02-05 Akim Demaille <akim@epita.fr>
530
531 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
532 * data/: here.
533
894dd62e
PE
5342002-01-29 Paul Eggert <eggert@twinsun.com>
535
536 * src/bison.simple (YYSIZE_T): Do not define merely because
537 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
538 On some platforms, <alloca.h> does not declare YYSTD (size_t).
539
82841af7
AD
5402002-01-27 Akim Demaille <akim@epita.fr>
541
542 Fix `%nonassoc and eof'.
543
544 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
545 which were not properly copied! Replace
546 memcpy (res->errs, src->errs, src->nerrs);
547 with
548 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
549 !!!
550 * tests/regression.at (%nonassoc and eof): Adjust to newest
551 Autotest: `.' is not in the PATH.
552
318b76e9
AD
5532002-01-27 Akim Demaille <akim@epita.fr>
554
555 * tests/sets.at (AT_EXTRACT_SETS): New.
556 (Nullable): Use it.
557 (Firsts): New.
558
30d2f3d5
AD
5592002-01-26 Akim Demaille <akim@epita.fr>
560
561 * tests/actions.at, tests/calc.at, tests/headers.at,
562 * tests/torture.at: Adjust to the newest Autotest which no longer
563 forces `.' in the PATH.
564
30f8c395
AD
5652002-01-25 Akim Demaille <akim@epita.fr>
566
567 * tests/regression.at (%nonassoc and eof): New.
568 Suggested by Robert Anisko.
569
29ae55f1
AD
5702002-01-24 Akim Demaille <akim@epita.fr>
571
572 Bison dumps core when trying to complain about broken input files.
573 Reported by Cris van Pelt.
574
575 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
576 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
577 into...
578 (Invalid inputs): Strengthen: exercise parse_percent_token.
579
2b548aa6
RA
5802002-01-24 Robert Anisko <robert.anisko@epita.fr>
581
582 * src/Makefile.am: Add bison.c++.
583 * src/bison.c++: New skeleton.
584
bb0146c2
AD
5852002-01-21 Paolo Bonzini <bonzini@gnu.org>
586
587 * po/it.po: New.
588
bec30531
AD
5892002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
590
591 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
592
fc6edc45
MA
5932002-01-20 Marc Autret <marc@gnu.org>
594
595 * src/files.c (compute_output_file_names): Fix
596
5e5d5415
MA
5972002-01-20 Marc Autret <marc@gnu.org>
598
599 * tests/output.at: New test.
600 * src/files.c (compute_base_names): Don't map extensions when
601 the YACC flag is set, use defaults.
602 Reported by Evgeny Stambulchik.
603
44ea3fbd
MA
6042002-01-20 Marc Autret <marc@gnu.org>
605
bb0146c2 606 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
607 compilers as well (i.e. the vendor C compiler).
608 Suggested by Albert Chin-A-Young.
609
338963d1
TVH
6102002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
611
612 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
613 canonical definition.
614 * src/system.h: Use the canonical definition for PARAMS (avoids
615 a conflict with the macro from lib/hash.h).
616
c57b2479
AD
6172002-01-11 Akim Demaille <akim@epita.fr>
618
619 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 620 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 621
b85810ae
AD
6222002-01-09 Akim Demaille <akim@epita.fr>
623
624 * src/files.c, src/files.h (output_infix): New.
625 (tab_extension): Remove.
626 (compute_base_names): Compute the former, drop the latter.
627 * src/output.c (prepare): Insert the muscles `output-infix', and
628 `output-suffix'.
629 * src/parse-skel.y (string, string.1): New.
630 (section.header): Use it.
631 (section.yacc): Remove.
632 (prefix): Remove too.
633 * src/scan-skel.l: Adjust.
634 * src/bison.simple, src/bison.hairy: Adjust.
635
cae60122
AD
6362002-01-09 Akim Demaille <akim@epita.fr>
637
638 * configure.in (WERROR_CFLAGS): Compute it.
639 * src/Makefile.am (CFLAGS): Pass it.
640 * tests/atlocal.in (CFLAGS): Idem.
641 * src/files.c: Fix a few warnings.
642 (get_extension_index): Remove, unused.
643
ae404801
AD
6442002-01-08 Akim Demaille <akim@epita.fr>
645
646 * src/getargs.c (AS_FILE_NAME): New.
647 (getargs): Use it to convert DOSish file names.
648 * src/files.c (base_name): Rename as full_base_name to avoid
649 clashes with `base_name ()'.
650 (filename_split): New.
651 (compute_base_names): N-th rewrite, using filename_split.
652
22312b71
AD
6532002-01-08 Akim Demaille <akim@epita.fr>
654
655 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
656 New, stolen from the Fileutils 4.1.
657 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
658 * configure.in: Check for the presence of memrchr, and of its
659 prototype.
660
a67cef01
TVH
6612002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
662
663 * lib/hash.h (__P): Added definition for this macro.
664 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
665 BUILT_SOURCES, to ensure they are generated first.
666 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
667 %error-verbose to allow bootstrapping with bison 1.30x.
668
2b25d624
AD
6692002-01-06 Akim Demaille <akim@epita.fr>
670
671 * src/reader.c (parse_braces): Don't fetch the next char, the
672 convention is to fetch on entry.
673 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
674 'switch' without a following semicolon.
675 * tests/regression.at (braces parsing): New.
676
3460813b
AD
6772002-01-06 Akim Demaille <akim@epita.fr>
678
679 Bison is dead wrong in its RR conflict reports.
680
681 * tests/torture.at (GNU Cim Grammar): New.
682 * src/conflicts.c (count_rr_conflicts): Fix.
683
73784c64
AD
6842002-01-06 Akim Demaille <akim@epita.fr>
685
686 Creating package.m4 from configure.ac causes too many problems.
687
688 * tests/Makefile.am (package.m4): Create it by hand,
689 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
690
25d81090
AD
6912002-01-06 Akim Demaille <akim@epita.fr>
692
693 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
694 skeleton.h.
695
a9b8959e
PE
6962002-01-04 Paul Eggert <eggert@twinsun.com>
697
698 * doc/bison.texinfo (Debugging):
699 Remove YYSTDERR; it's no longer defined or used.
700 Also, s/cstdio.h/cstdio/.
701
25d81090
AD
7022002-01-03 Akim Demaille <akim@epita.fr>
703
704 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
705
1109455c
AD
7062002-01-03 Akim Demaille <akim@epita.fr>
707
708 * src/parse-skel.y (process_skeleton): Don't bind the parser's
709 tracing code to --trace, wait for a better --trace option, with
710 args.
711
7ea5e977
AD
7122002-01-03 Akim Demaille <akim@epita.fr>
713
714 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
715 The ISO C++ standard is extremely clear about it: stderr is
716 considered a macro, not a regular symbol (see table 94 `Header
717 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
718 Therefore std:: does not apply to it. It still does with fprintf.
719 Also, s/cstdio.h/cstdio/.
720
fab5b110
AD
7212002-01-03 Akim Demaille <akim@epita.fr>
722
723 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
724 for non system headers.
725
aed7fd9b
AD
7262002-01-02 Akim Demaille <akim@epita.fr>
727
728 Equip the skeleton chain with location tracking, runtime trace,
729 pure parser and scanner.
730
731 * src/parse-skel.y: Request a pure parser, locations, and prefix
732 renaming.
733 (%union): Having several members with the same type does not help
734 type mismatches, simplify.
735 (YYPRINT, yyprint): New.
736 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
737 (skel_error): this.
738 Handle locations.
739 * src/scan-skel.l: Adjust to these changes.
740 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
741 (LOCATION_PRINT, skel_control_t): New.
742
24fad99e
AD
7432001-12-30 Akim Demaille <akim@epita.fr>
744
745 * src/parse-skel.y: Get rid of the shift/reduce conflict:
746 replace `gb' with BLANKS.
747 * src/scan-skel.l: Adjust.
748
a4b36db4
AD
7492001-12-30 Akim Demaille <akim@epita.fr>
750
751 * src/system.h: We don't need nor want bcopy.
752 Throw away MS-DOS crap: we don't need getpid.
753 * configure.in: We don't need strndup. It was even causing
754 problems: because Flex includes the headers *before* us,
755 _GNU_SOURCE is not defined by config.h, and therefore strndup was
756 not visible.
757 * lib/xstrndup.c: New.
758 * src/scan-skel.l: Use it.
759 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
760 * src/parse-skel.y: Use %directives instead of #defines.
761
1239777d
AD
7622001-12-30 Akim Demaille <akim@epita.fr>
763
764 * src/skeleton.h: New.
765 * src/output.c (output_parser, output_master_parser): Remove, dead
766 code.
767 * src/output.h (get_lines_number, actions_output, guards_output)
768 (token_definitions_output): Prototype them.
769 * src/parse-skel.y: Add the license notice.
770 Include output.h and skeleton.h.
771 (process_skeleton): Returns void, and takes a single parameter.
772 * src/scan-skel.l: Add the license notice.
773 Include skeleton.h.
774 Don't use %option yylineno: it seems that then Flex imagines
775 REJECT has been used, and therefore it won't reallocate its
776 buffers (which makes no other sense to me than a bug). It results
777 in warnings for `unused: yy_flex_realloc'.
778
9b3add5b
RA
7792001-12-30 Robert Anisko <robert.anisko@epita.fr>
780
781 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
782 (MUSCLE_INSERT_PREFIX): ...to there.
783 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
784 (MUSCLE_INSERT_PREFIX): Move from here...
785
786 * src/bison.hairy: Add a section directive. Put braces around muscle
787 names. This parser skeleton is still broken, but Bison should not
788 choke on a bad muscle 'syntax'.
789 * src/bison.simple: Add a section directive. Put braces around muscle
790 names.
791
792 * src/files.h (strsuffix, stringappend): Add declarations.
793 (tab_extension): Add declaration.
794 (short_base_name): Add declaration.
795
796 * src/files.c (strsuffix, stringappend): No longer static. These
797 functions are used in the skeleton parser.
798 (tab_extension): New.
799 (compute_base_names): Use the computations done in this function
fab5b110 800 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
801 names.
802 (short_base_name): No longer static.
803
804 * src/output.c (output_skeleton): New.
805 (output): Disable call to output_master_parser, and give a try to
806 a new skeleton handling system.
807 (guards_output, actions_output): No longer static.
808 (token_definitions_output, get_lines_number): No longer static.
809
810 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
811
fab5b110 812 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
813 parse-skel.y.
814
815 * src/parse-skel.y: New file.
816 * src/scan-skel.l: New file.
817
b5b61c61
AD
8182001-12-29 Akim Demaille <akim@epita.fr>
819
820 %name-prefix is broken.
821
822 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
823 Adjust all dependencies.
824 * tests/headers.at (export YYLTYPE): Strengthen this test: use
825 %name-prefix.
826
827 Renaming yylval but not yylloc is not consistent. Now we do.
828
829 * src/bison.simple: Prefix yylloc if used.
830 * doc/bison.texinfo (Decl Summary): Document that.
831
8c9a50be
AD
8322001-12-29 Akim Demaille <akim@epita.fr>
833
834 * doc/bison.texinfo: Promote `%long-directive' over
835 `%long_directive'.
836 Remove all references to fixed-output-files, yacc is enough.
837
d99361e6
AD
8382001-12-29 Akim Demaille <akim@epita.fr>
839
840 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
841 user prologue. These are defaults.
842 * tests/actions.at (Mid-rule actions): Make sure the user can
843 define YYDEBUG and YYERROR_VERBOSE.
844
b9cecb91
AD
8452001-12-29 Akim Demaille <akim@epita.fr>
846
847 * src/output.c (header_output): Don't forget to export YYLTYPE and
848 yylloc.
849 * tests/headers.at (export YYLTYPE): New, make sure it does.
850 * tests/regression.at (%union and --defines, Invalid CPP headers):
851 Move to...
852 * tests/headers.at: here.
853
aea13e97
AD
8542001-12-29 Akim Demaille <akim@epita.fr>
855
856 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
857
931394cb
AD
8582001-12-29 Akim Demaille <akim@epita.fr>
859
860 * tests/actions.at (Mid-rule actions): Output on a single line
861 instead of several.
862
704a47c4
AD
8632001-12-29 Akim Demaille <akim@epita.fr>
864
865 * doc/bison.texinfo: Formatting changes.
866
091e20bb
AD
8672001-12-29 Akim Demaille <akim@epita.fr>
868
869 Don't store the token defs in a muscle, just be ready to output it
870 on command. Now possible via `symbols'. Fixes a memory leak.
871
872 * src/output.c (token_definitions_output): New.
873 (output_parser, header_output): Use it.
874 * src/reader.c (symbols_save): Remove.
875
cce71710
AD
8762001-12-29 Akim Demaille <akim@epita.fr>
877
878 * src/bison.simple: Do not provide a default for YYSTYPE and
879 YYLTYPE before the user's prologue. Otherwise it's hardly... a
880 default.
881
82c035a8
AD
8822001-12-29 Akim Demaille <akim@epita.fr>
883
884 Mid-rule actions are simply... ignored!
885
886 * src/reader.c (readgram): Be sure to attach mid-rule actions to
887 the empty-rule associated to the dummy symbol, not to the host
888 rule.
889 * tests/actions.at (Mid-rule actions): New.
890
8419d367
AD
8912001-12-29 Akim Demaille <akim@epita.fr>
892
893 Memory leak.
894
895 * src/reader.c (reader): Free grammar.
896
375d5806
AD
8972001-12-29 Akim Demaille <akim@epita.fr>
898
899 Memory leak.
900
901 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
902 since it allocates it for each state, although only one is needed.
903 (allocate_storage): Do it here.
904
f51cb8ff
AD
9052001-12-29 Akim Demaille <akim@epita.fr>
906
907 * src/options.h, src/options.c (create_long_option_table): Rename
908 as...
909 (long_option_table_new): this, with a clearer prototype.
910 (percent_table): Remove, unused,
911 * src/getargs.c (getargs): Adjust.
912
29e88316
AD
9132001-12-29 Akim Demaille <akim@epita.fr>
914
915 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
916 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
917 as states.
918
b9f71f19
AD
9192001-12-29 Akim Demaille <akim@epita.fr>
920
921 * src/lalr.c (build_relations): Rename `states' as `states1'.
922 Sorry, I don't understand exactly what it is, no better name...
923
1a2b5d37
AD
9242001-12-29 Akim Demaille <akim@epita.fr>
925
926 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
927 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
928 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
929 as rules.
930
1cca533e
AD
9312001-12-29 Akim Demaille <akim@epita.fr>
932
933 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
934 ago.
935
c03ae966
AD
9362001-12-29 Akim Demaille <akim@epita.fr>
937
938 * src/reader.c, src/reader.h (user_toknums): Remove.
939 Adjust all users to use symbols[i]->user_token_number.
940
5a670b1e
AD
9412001-12-29 Akim Demaille <akim@epita.fr>
942
943 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
944 Adjust all users to use symbols[i]->prec or ->assoc.
945
ad949da9
AD
9462001-12-29 Akim Demaille <akim@epita.fr>
947
948 * src/reader.c, src/reader.h (tags): Remove.
949 Adjust all users to use symbols[i]->tag.
950
0e78e603
AD
9512001-12-29 Akim Demaille <akim@epita.fr>
952
953 * src/gram.h, src/gram.c (symbols): New, similar to state_table
954 and rule_table.
955 * src/reader.c (packsymbols): Fill this table.
956 Drop sprec.
957 * src/conflicts.c (resolve_sr_conflict): Adjust.
958 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
959 single table.
960 Use symbols[i]->tag instead of tags[i].
961
213e640e
AD
9622001-12-29 Akim Demaille <akim@epita.fr>
963
964 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
965 In addition, put a comment in there, to replace...
966 * tests/regression.at (%union and C comments): Remove.
967
e7b8bef1
AD
9682001-12-29 Akim Demaille <akim@epita.fr>
969
970 * tests/regression.at (Web2c Actions): Blindly move the actual
971 output as expected output. The contents *seem* right to me, but I
972 can't pretend reading perfectly parser tables... Nonetheless, all
973 the other tests pass correctly, the table look OK, even though the
974 presence of `$axiom' is to be noted: AFAICS it is useless (but
975 harmless).
976
b68e7744
AD
9772001-12-29 Akim Demaille <akim@epita.fr>
978
979 * src/reader.c (readgram): Don't add the rule 0 if there were no
980 rules read. In other words, add it _after_ having performed
981 grammar sanity checks.
982 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
983
78d5bae9
AD
9842001-12-29 Akim Demaille <akim@epita.fr>
985
986 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
987 visible, and some states have now a different number.
988
ff442794
AD
9892001-12-29 Akim Demaille <akim@epita.fr>
990
991 * src/reader.c (readgram): Bind the initial rule's lineno to that
992 of the first rule.
993 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
994 (Solved SR Conflicts): Adjust rule 0's line number.
995
610ab194
AD
9962001-12-29 Akim Demaille <akim@epita.fr>
997
998 Fix the `GAWK Grammar' failure.
999
1000 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1001 the reductions of the first state which was mistakenly confused
1002 with the final state because precisely final_state was initialized
1003 to 0.
1004 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1005 now noticed by Bison.
1006 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1007 have a reduction on $default.
1008
29d29c8f
AD
10092001-12-29 Akim Demaille <akim@epita.fr>
1010
1011 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1012 rule line numbers.
1013 * src/closure.c (print_closure): Likewise.
1014 * src/derives.c (print_derives): Likewise.
1015 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1016 now.
1017
7c6b64d0
AD
10182001-12-29 Akim Demaille <akim@epita.fr>
1019
1020 * src/lalr.c (lookaheads_print): New.
1021 (lalr): Call it when --trace-flag.
1022 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1023 are dumped.
1024
3d4daee3
AD
10252001-12-29 Akim Demaille <akim@epita.fr>
1026
1027 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1028 when walking through ritem, even via rule->rhs.
1029 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1030 (useful_production, useless_nonterminals): Likewise.
1031 (reduce_grammar_tables): Likewise, plus update nritems.
1032 * src/nullable.c (set_nullable): Likewise.
1033 * src/lalr.c (build_relations): Likewise.
1034 * tests/sets.at (Nullable): Adjust.
1035 Fortunately, now, the $axiom is no longer nullable.
1036
9e7f6bbd
AD
10372001-12-29 Akim Demaille <akim@epita.fr>
1038
1039 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1040 the 0-sentinel.
1041 * src/gram.c (ritem_longest_rhs): Likewise.
1042 * src/reduce.c (nonterminals_reduce): Likewise.
1043 * src/print_graph.c (print_graph): Likewise.
1044 * src/output.c (output_rule_data): Likewise.
1045 * src/nullable.c (set_nullable): Likewise.
1046
255ef638
AD
10472001-12-29 Akim Demaille <akim@epita.fr>
1048
1049 * src/output.c: Comment changes.
1050
0d8a7363
AD
10512001-12-27 Paul Eggert <eggert@twinsun.com>
1052
1053 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1054 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1055 Sparc, as they were causing more porting problems than the
1056 (minor) performance improvement was worth.
1057
1058 Also, catch up with 1.31's YYSTD.
1059
3db472b9
AD
10602001-12-27 Akim Demaille <akim@epita.fr>
1061
1062 * src/output.c (output_gram): Rely on nritems, not the
1063 0-sentinel. See below.
1064 Use -1 as separator, not 0.
1065 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1066 Rely on -1 as separator in yyrhs, instead of 0.
1067 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1068 twice `Now at end of input', therefore there are two lines less to
1069 expect.
1070
b365aa05
AD
10712001-12-27 Akim Demaille <akim@epita.fr>
1072
1073 * tests/regression.at (Unresolved SR Conflicts):
1074 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1075 below.
1076
30171f79
AD
10772001-12-27 Akim Demaille <akim@epita.fr>
1078
1079 * src/LR0.c (new_state): Recognize the final state by the fact it
1080 is reached by eoftoken.
1081 (insert_start_shifting_state, insert_eof_shifting_state)
1082 (insert_accepting_state, augment_automaton): Remove, since now
1083 these states are automatically computed from the initial state.
1084 (generate_states): Adjust.
1085 * src/print.c: When reporting a rule number to the user, substract
1086 1, so that the axiom rule is rule 0, and the first user rule is 1.
1087 * src/reduce.c: Likewise.
1088 * src/print_graph.c (print_core): For the time being, just as for
1089 the report, depend upon --trace-flags to dump the full set of
1090 items.
1091 * src/reader.c (readgram): Once the grammar read, insert the rule
1092 0: `$axiom: START-SYMBOL $'.
1093 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1094 number of the states has changed (the final state is no longer
1095 necessarily the last), catch up.
1096
75142d45
AD
10972001-12-27 Akim Demaille <akim@epita.fr>
1098
1099 Try to make the use of the eoftoken valid. Given that its value
1100 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1101 is used instead of > 0 where appropriate, (ii), depend upon nritems
1102 instead of the 0-sentinel.
1103
1104 * src/gram.h, src/gram.c (nritems): New.
1105 Expected to be duplication of nitems, but for the time being...
1106 * src/reader.c (packgram): Assert nritems and nitems are equal.
1107 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1108 * src/closure.c (print_closure, print_fderives): Likewise.
1109 * src/gram.c (ritem_print): Likewise.
1110 * src/print.c (print_core, print_grammar): Likewise.
1111 * src/print_graph.c: Likewise.
1112
b7c49edf
AD
11132001-12-27 Akim Demaille <akim@epita.fr>
1114
1115 * src/main.c (main): If there are complains after grammar
1116 reductions, then output the report anyway if requested, then die.
1117 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1118 * src/reader.c (eoftoken): New.
1119 (parse_token_decl): If the token being defined has value `0', it
1120 is the eoftoken.
1121 (packsymbols): No longer hack `tags' to insert `$' by hand.
1122 Be sure to preserve the value of the eoftoken.
1123 (reader): Make sure eoftoken is defined.
1124 Initialize nsyms to 0: now eoftoken is created just like the others.
1125 * src/print.c (print_grammar): Don't special case the eof token.
1126 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1127 lie anyway, albeit pleasant.
1128 * tests/calc.at: Exercise error messages with eoftoken.
1129 Change the grammar so that empty input is invalid.
1130 Adjust expectations.
1131 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1132
ec2da99f
AD
11332001-12-27 Akim Demaille <akim@epita.fr>
1134
1135 * configure.in: Check the protos of strchr ans strspn.
1136 Replace strchr if needed.
1137 * src/system.h: Provide the protos of strchr, strspn and memchr if
1138 missing.
1139 * lib/strchr.c: New.
1140 * src/reader.c (symbols_save): Use strchr.
1141
8adfa272
AD
11422001-12-27 Akim Demaille <akim@epita.fr>
1143
1144 * src/print.c, src/print_graph.c (escape): New.
1145 Use it to quote the TAGS outputs.
1146 * src/print_graph.c (print_state): Now errors are in red, and
1147 reductions in green.
1148 Prefer high to wide: output the state number on a line of its own.
1149
80dac38c
AD
11502001-12-27 Akim Demaille <akim@epita.fr>
1151
1152 * src/state.h, src/state.c (reductions_new): New.
1153 * src/LR0.c (set_state_table): Let all the states have a
1154 `reductions', even if reduced to 0.
1155 (save_reductions): Adjust.
1156 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1157 * src/print.c (print_reductions, print_actions): Adjust.
1158 * src/output.c (action_row): Adjust.
1159
2cec70b9
AD
11602001-12-27 Akim Demaille <akim@epita.fr>
1161
1162 * src/state.h, src/state.c (errs_new, errs_dup): New.
1163 * src/LR0.c (set_state_table): Let all the states have an errs,
1164 even if reduced to 0.
1165 * src/print.c (print_errs, print_reductions): Adjust.
1166 * src/output.c (output_actions, action_row): Adjust.
1167 * src/conflicts.c (resolve_sr_conflict): Adjust.
1168
13ca549a
AD
11692001-12-27 Akim Demaille <akim@epita.fr>
1170
1171 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1172
5092aba5
AD
11732001-12-27 Akim Demaille <akim@epita.fr>
1174
1175 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1176 * src/print.c: here.
1177 (lookaheadset, shiftset): New, used as additional storage by
1178 print_reductions.
1179 (print_results): Adjust.
1180 (print_shifts, print_gotos, print_errs): New, extracted from...
1181 (print_actions): here.
1182 * src/print_graph.c (print_actions): Remove dead code.
1183
11e2beca
AD
11842001-12-27 Akim Demaille <akim@epita.fr>
1185
1186 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1187 `$n' and `@n'.
1188
dac3c910
AD
11892001-12-27 Akim Demaille <akim@epita.fr>
1190
1191 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1192 (build_relations): Adjust.
1193
d0b0fefa
AD
11942001-12-27 Akim Demaille <akim@epita.fr>
1195
1196 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1197 duplication.
1198
adc8c848
AD
11992001-12-27 Akim Demaille <akim@epita.fr>
1200
1201 * src/reader.c (packgram): Catch nitems overflows.
1202
14d293ac
AD
12032001-12-27 Akim Demaille <akim@epita.fr>
1204
1205 * src/files.c, src/files.h (guard_obstack): Remove.
1206 * src/output.c (output): Adjust.
1207 * src/reader.c (parse_braces): New, factoring...
1208 (copy_action, copy_guard): these two which are renamed as...
1209 (parse_action, parse_guard): these.
1210 As a voluntary consequence, using braces around guards is now
1211 mandatory.
1212
f499b062
AD
12132001-12-27 Akim Demaille <akim@epita.fr>
1214
1215 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1216 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1217 members.
1218 (symbol_list_new): Adjust.
1219 (copy_action): action_line is the first line, not the last.
1220 (copy_guard): Just as for actions, store the `action' only, not
1221 the switch/case/break flesh.
1222 Don't parse the user action that might follow the guard, let...
1223 (readgram): do it, i.e., now, there can be an action after a
1224 guard.
1225 In other words the guard is just explicitly optional.
1226 (packgram): Adjust.
1227 * src/output.c (guards_output): New.
1228 (output_parser): Call it when needed.
1229 (output): Also free the guard and attrs obstacks.
1230 * src/files.c, src/files.h (obstack_save): Remove.
1231 (output_files): Remove.
1232 As a result, if one needs the former `.act' file, using an
1233 appropriate skeleton which requires actions and guards is now
1234 required.
1235 * src/main.c (main): Adjust.
1236 * tests/semantic.at: New.
1237 * tests/regression.at: Use `input.y' as input file name.
1238 Avoid 8+3 problems by requiring input.c when the test needs the
1239 parser.
1240
d945f5cd
AD
12412001-12-27 Akim Demaille <akim@epita.fr>
1242
1243 * src/reader.c (symbol_list_new): Be sure to initialize all the
1244 fields.
1245
d200e455
AD
12462001-12-27 Akim Demaille <akim@epita.fr>
1247
1248 All the hacks using a final pseudo state are now useless.
1249
1250 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1251 * src/lalr.c (nLA): New.
1252 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1253 instead of lookaheadsp from the pseudo state (nstate + 1).
1254
f9507c28
AD
12552001-12-27 Akim Demaille <akim@epita.fr>
1256
1257 * src/output.c (action_row, token_actions): Use a state_t instead
1258 of a integer, and nlookaheads instead of the following state's
1259 lookaheadsp.
1260
065fbd27
AD
12612001-12-27 Akim Demaille <akim@epita.fr>
1262
1263 * src/conflicts.c (log_resolution, flush_shift)
1264 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1265 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1266 (conflicts_print, print_reductions): Use a state_t instead of an
1267 integer when referring to a state.
1268 As much as possible, depend upon nlookaheads, instead of the
1269 `lookaheadsp' member of the following state (since lookaheads of
1270 successive states are successive, the difference between state n + 1
1271 and n served as the number of lookaheads for state n).
1272 * src/lalr.c (add_lookback_edge): Likewise.
1273 * src/print.c (print_core, print_actions, print_state)
1274 (print_results): Likewise.
1275 * src/print_graph.c (print_core, print_actions, print_state)
1276 (print_graph): Likewise.
1277 * src/conflicts.h: Adjust.
1278
1b177bd7
AD
12792001-12-27 Akim Demaille <akim@epita.fr>
1280
1281 * src/bison.hairy: Formatting/comment changes.
1282 ANSIfy.
1283 Remove `register' indications.
1284 Add plenty of `static'.
1285
7742ddeb
AD
12862001-12-27 Akim Demaille <akim@epita.fr>
1287
1288 * src/output.c (prepare): Drop the muscle `ntbase' which
1289 duplicates ntokens.
1290 * src/bison.simple: Formatting/comment changes.
1291 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1292 is an undocumented synonym.
1293
1fa14068
AD
12942001-12-22 Akim Demaille <akim@epita.fr>
1295
1296 * src/output.c (output_table_data): Change the prototype to use
1297 `int' for array ranges: some invocations do pass an int, not a
1298 short.
1299 Reported by Wayne Green.
1300
b9752825
AD
13012001-12-22 Akim Demaille <akim@epita.fr>
1302
1303 Some actions of web2c.y are improperly triggered.
1304 Reported by Mike Castle.
1305
1306 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1307 * tests/regression.at (Web2c): Rename as...
1308 (Web2c Report): this.
1309 (Web2c Actions): New.
1310
776209d6
AD
13112001-12-22 Akim Demaille <akim@epita.fr>
1312
1313 Reductions in web2c.y are improperly reported.
1314 Reported by Mike Castle.
1315
1316 * src/conflicts.c (print_reductions): Fix.
1317 * tests/regression.at (Web2c): New.
1318
275fc3ad
AD
13192001-12-18 Akim Demaille <akim@epita.fr>
1320
1321 Some host fail on `assert (!"foo")', which expands to
1322 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1323 Reported by Nelson Beebee.
1324
1325 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1326 `#define it_succeeded 0' and `assert (it_succeeded)'.
1327
897668ee
MA
13282001-12-17 Marc Autret <autret_m@epita.fr>
1329
1330 * src/bison.simple: Don't hard code the skeleton line and filename.
1331 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1332 New line counter 'skeleton_line' (skeleton-line muscle).
1333
ab3399e0
PE
13342001-12-17 Paul Eggert <eggert@twinsun.com>
1335
1336 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1337 YYDEBUG must be defined to a nonzero value.
1338
1339 * src/bison.simple (yytname): Do not assume that the user defines
1340 YYDEBUG to a properly parenthesized expression.
1341
3877f72b
AD
13422001-12-17 Akim Demaille <akim@epita.fr>
1343
1344 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1345 nlookaheads is a new member.
1346 Adjust all users.
1347 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1348 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1349 state.
776209d6 1350
331dbc1b
AD
13512001-12-17 Akim Demaille <akim@epita.fr>
1352
1353 * src/files.h, src/files.c (open_files, close_files): Remove.
1354 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1355 let...
1356 * src/reader.c (reader): Do it.
776209d6 1357
be750e4c
AD
13582001-12-17 Akim Demaille <akim@epita.fr>
1359
1360 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1361
709ae8c6
AD
13622001-12-17 Akim Demaille <akim@epita.fr>
1363
1364 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1365 (flush_reduce): New.
1366 (resolve_sr_conflict): Adjust.
776209d6 1367
f87685c3
AD
13682001-12-17 Akim Demaille <akim@epita.fr>
1369
1370 * src/output.c (output_obstack): Be static and rename as...
1371 (format_obstack): this, to avoid any confusion with files.c's
1372 output_obstack.
1373 * src/reader.h (muscle_obstack): Move to...
1374 * src/output.h: here, since it's defined in output.c.
1375
837491d8
AD
13762001-12-17 Akim Demaille <akim@epita.fr>
1377
1378 * src/output.c (action_row, save_column, default_goto)
1379 (sort_actions, matching_state, pack_vector): Better variable
1380 locality.
1381
796d61fb
AD
13822001-12-17 Akim Demaille <akim@epita.fr>
1383
1384 * src/output.c: Various formatting changes.
776209d6 1385
64d15509
AD
13862001-12-17 Akim Demaille <akim@epita.fr>
1387
1388 * src/files.c (output_files): Free the output_obstack.
1389 * src/main.c (main): Call print and print_graph conditionally.
1390 * src/print.c (print): Work unconditionally.
1391 * src/print_graph.c (print_graph): Work unconditionally.
1392 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1393
fbc8ecb7
MA
13942001-12-16 Marc Autret <autret_m@epita.fr>
1395
1396 * src/output.c (actions_output): Fix. When we use %no-lines,
1397 there is one less line per action.
1398
f0440388
MA
13992001-12-16 Marc Autret <autret_m@epita.fr>
1400
1401 * src/bison.simple: Remove a useless #line directive.
1402 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1403 * src/output.c (get_lines_number): New.
776209d6 1404 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1405 output muscles.
1406 Fix line numbering.
1407 (actions_output): Computes the number of lines taken by actions.
1408 (output_master_parser): Insert new skeleton which is the name of
1409 the output parser file name.
1410
a79986b8
MA
14112001-12-15 Marc Autret <autret_m@epita.fr>
1412
1413 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1414
4ec8e00f
MA
14152001-12-15 Marc Autret <autret_m@epita.fr>
1416
1417 * src/output.c (output_gram): Keep track of the hairy one.
1418
1a4648ff
AD
14192001-12-15 Akim Demaille <akim@epita.fr>
1420
1421 Make `make distcheck' work.
1422
1423 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1424 system.h which uses libgettext.h.
1425
9c2c67e6
AD
14262001-12-15 Akim Demaille <akim@epita.fr>
1427
1428 * src/nullable.c (set_nullable): Useless rules must be skipped,
1429 otherwise, since we range over their symbols, we might look at a
1430 nonterminal which no longer ``exists'', i.e., it is not counted in
1431 `nvars', hence we overflow our arrays.
1432
93ede233
AD
14332001-12-15 Akim Demaille <akim@epita.fr>
1434
1435 The header can also be produced directly, without any obstack!
1436 Yahoo!
1437
1438 * src/files.c, src/files.h (defines_obstack): Remove.
1439 (compute_header_macro): Global.
1440 (defines_obstack_save): Remove.
1441 * src/reader.c (parse_union_decl): No longer output to
1442 defines_obstack: its content can be found in the `stype' muscle
1443 anyway.
1444 (output_token_translations): Merge into...
1445 (symbols_output): this.
1446 Rename as...
1447 (symbols_save): this.
1448 (reader): Adjust.
1449 * src/output.c (header_output): New.
1450 (output): Call it.
1451
2666f928
AD
14522001-12-15 Akim Demaille <akim@epita.fr>
1453
1454 * src/reader.c (parse_union_decl): Instead of handling two obstack
1455 simultaneously, use one to define the `stype' muscle, and use the
1456 value of the latter to fill defines_obstack.
1457 (copy_comment): Remove.
1458 (copy_comment2): Work for a single obstack.
1459 Rename as...
1460 (copy_comment): this.
1461
428046f8
AD
14622001-12-15 Akim Demaille <akim@epita.fr>
1463
1464 * src/lex.c, src/lex.h (xgetc): No longer static.
1465 * src/reader.c (parse_union_decl): Revamp.
1466
ea52d706
AD
14672001-12-15 Akim Demaille <akim@epita.fr>
1468
1469 Still making progress in separating Bison into (i) input, (ii)
1470 process, (iii) output: now we can directly output the parser file
1471 without using table_obstack at all.
1472
1473 * src/files.c, src/files.h (table_obstack): Bye bye.
1474 (parser_file_name): New.
1475 * src/files.c (compute_output_file_names): Compute it.
1476 * src/output.c (actions_output, output_parser)
1477 (output_master_parser): To a file instead of an obstack.
1478
3f96f4dc
AD
14792001-12-15 Akim Demaille <akim@epita.fr>
1480
1481 Attach actions to rules, instead of pre-outputting them to
1482 actions_obstack.
1483
1484 * src/gram.h (rule_t): action and action_line are new members.
1485 * src/reader.c (symbol_list): Likewise.
1486 (copy_action): Save the actions within the rule.
1487 (packgram): Save them in rule_table.
1488 * src/output.c (actions_output): New.
1489 (output_parser): Use it on `%%actions'.
1490 (output_rule_data): Don't free rule_table.
1491 (output): Do it.
1492 (prepare): Don't save the `action' muscle.
1493 * src/bison.simple: s/%%action/%%actions/.
1494
51576fb3
AD
14952001-12-15 Akim Demaille <akim@epita.fr>
1496
1497 * src/reader.c (copy_action): When --yacc, don't append a `;'
1498 to the user action: let it fail if lacking.
dee049eb 1499 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1500
2648a72d
AD
15012001-12-14 Akim Demaille <akim@epita.fr>
1502
1503 * src/lex.c (literalchar): Simply return the char you decoded, non
1504 longer mess around with obstacks and int pointers.
1505 Adjust all callers.
1506
92790e5b
AD
15072001-12-14 Akim Demaille <akim@epita.fr>
1508
1509 * src/lex.c (literalchar): Don't escape the special characters,
1510 just decode them, and keep them as char (before, eol was output as
1511 the 2 char string `\n' etc.).
1512 * src/output.c (output_rule_data): Use quotearg to output the
1513 token strings.
1514
927c1557
PE
15152001-12-13 Paul Eggert <eggert@twinsun.com>
1516
1517 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1518 Do not infringe on the global user namespace when using C++.
1519 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1520 All uses of `fprintf' and `stderr' changed.
1521
1522 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1523
ed8e1f68
AD
15242001-12-13 Akim Demaille <akim@epita.fr>
1525
1526 The computation of nullable is broken: it doesn't handle empty
1527 RHS's properly.
1528
1529 * tests/torture.at (GNU AWK Grammar): New.
1530 * tests/sets.at (Nullable): New.
1531 * src/nullable.c (set_nullable): Instead of blindly looping over
1532 `ritems', loop over the rules, and then over their rhs's.
1533
1534 Work around Autotest bugs.
1535
1536 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1537 frame, because Autotest understand lines starting with a `+' as
1538 traces from the shell. Then, they are not processed properly.
1539 Admittedly an Autotest bug, but we don't have time to wait for
1540 Autotest to catch up.
1541 * tests/regression.at (Broken Closure): Adjust to the new table
1542 frames.
1543 Move to...
1544 * tests/sets.at: here.
1545
cb581495
AD
15462001-12-13 Akim Demaille <akim@epita.fr>
1547
1548 * src/closure.c (closure): Use nrules instead of playing tricks
1549 with BITS_PER_WORD.
1550
2e729273
AD
15512001-12-13 Akim Demaille <akim@epita.fr>
1552
1553 * src/print.c (print_actions): Output the handling of `$' as the
1554 traces do: shifting the token EOF. Before EOF was treated as a
1555 nonterminal.
1556 * tests/regression.at: Adjust some tests.
1557 * src/print_graph.c (print_core): Complete the set of items via
1558 closure. The next-to-final and final states are still unsatisfying,
1559 but that's to be addressed elsewhere.
1560 No longer output the rule numbers, but do output the state number.
1561 A single loop for the shifts + gotos is enough, but picked a
1562 distinct color for each.
1563 (print_graph): Initialize and finalize closure.
1564
107f7dfb
AD
15652001-12-13 Akim Demaille <akim@epita.fr>
1566
1567 * src/reader.c (readgram): Remove dead code, an strip useless
1568 braces.
1569 (get_type): Remove, unused.
1570
9b53a24f
AD
15712001-12-12 Akim Demaille <akim@epita.fr>
1572
1573 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1574 on that of lib/error.c.
1575
dbfb6dcd
AD
15762001-12-12 Akim Demaille <akim@epita.fr>
1577
1578 Some hosts don't like `/' in includes.
1579
1580 * src/system.h: Include libgettext.h without qualifying the path.
1581 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1582 $(top_srcdir).
1583
c25fb648
MA
15842001-12-11 Marc Autret <autret_m@epita.fr>
1585
1586 * src/output.c (output_parser): Remove useless muscle.
1587
710ddc4f
MA
15882001-12-11 Marc Autret <autret_m@epita.fr>
1589
1590 * src/bison.simple: Remove #line just before %%epilogue. It
1591 is now handled in ...
1592 * src/reader.c (read_additionnal_code): Add the output of a
1593 #line for the epilogue.
1594
e83d80b8
MA
15952001-12-10 Marc Autret <autret_m@epita.fr>
1596
927c1557 1597 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1598 replace precedent remove.
1599 * src/bison.simple: Remove #line before %%prologue because
1600 %%input-line is wrong at this time.
1601
971d5158
MA
16022001-12-10 Marc Autret <autret_m@epita.fr>
1603
1604 * src/reader.c (symbols_output): Clean up.
927c1557 1605 * src/output.c (output_gram, output): Clean up.
971d5158 1606
5edafffd
AD
16072001-12-10 Akim Demaille <akim@epita.fr>
1608
1609 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1610 * src/LR0.c (set_state_table): here.
1611 * src/lalr.c (lalr): Call it.
1612
0279f8e9
AD
16132001-12-10 Akim Demaille <akim@epita.fr>
1614
1615 * src/state.h (shifts): Remove the `number' member: shifts are
1616 attached to state, hence no longer need to be labelled with a
1617 state number.
1618
190c4f5f
AD
16192001-12-10 Akim Demaille <akim@epita.fr>
1620
1621 Now that states have a complete set of members, the linked list of
1622 shifts is useless: just fill directly the state's shifts member.
1623
1624 * src/state.h (shifts): Remove the `next' member.
1625 * src/LR0.c (first_state, last_state): Remove.
1626 Adjust the callers.
1627 (augment_automaton): Don't look for the shifts that must be added
1628 a shift on EOF: it is those of the state we looked for! But now,
1629 since shifts are attached, it is no longer needed to looking
1630 merely by its id: its number.
1631
2a73b93d
AD
16322001-12-10 Akim Demaille <akim@epita.fr>
1633
1634 * src/LR0.c (augment_automaton): Better variable locality.
1635 Remove an impossible branch: if there is a state corresponding to
1636 the start symbol being shifted, then there is shift for the start
1637 symbol from the initial state.
1638
74392f6a
AD
16392001-12-10 Akim Demaille <akim@epita.fr>
1640
1641 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1642 only when appropriate: when insert_start_shifting_state' is not
1643 invoked.
1644 * tests/regression.at (Rule Line Numbers): Adjust.
1645
37c82725
AD
16462001-12-10 Akim Demaille <akim@epita.fr>
1647
1648 * src/LR0.c (augment_automaton): Now that all states have shifts,
1649 merge the two cases addition shifts to the initial state.
1650
6a164e0c
AD
16512001-12-10 Akim Demaille <akim@epita.fr>
1652
1653 * src/lalr.c (set_state_table): Move to...
1654 * src/LR0.c: here.
1655 * src/lalr.c (lalr): Don't call it...
1656 * src/LR0.c (generate_states): do it.
1657 * src/LR0.h (first_state): Remove, only the table is used.
1658
7215de24
AD
16592001-12-10 Akim Demaille <akim@epita.fr>
1660
1661 * src/LR0.h (first_shift, first_reduction): Remove.
1662 * src/lalr.c: Don't use first_shift: find shifts through the
1663 states.
1664
80e25d4d
AD
16652001-12-10 Akim Demaille <akim@epita.fr>
1666
1667 * src/LR0.c: Attach shifts to states as soon as they are
1668 computed.
1669 * src/lalr.c (set_state_table): Instead of assigning shifts to
1670 state, just assert that the mapping was properly done.
1671
0ab3728b
AD
16722001-12-10 Akim Demaille <akim@epita.fr>
1673
1674 * src/LR0.c (insert_start_shift): Rename as...
1675 (insert_start_shifting_state): this.
1676 (insert_eof_shifting_state, insert_accepting_state): New.
1677 (augment_automaton): Adjust.
1678 Better locality of the variables.
1679 When looking if the start_symbol is shifted from the initial
1680 state, using `while (... symbol != start_symbol ...)' sounds
1681 better than `while (... symbol < start_symbol ...)': If fail
1682 to see how the order between symbols could be relevant!
1683
78af9bbc
AD
16842001-12-10 Akim Demaille <akim@epita.fr>
1685
1686 * src/getargs.h: Don't declare `spec_name_prefix' and
1687 `spec_file_prefix', declared by src/files.h.
1688 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1689 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1690 * src/output.c (prepare): Adjust.
1691 * src/reader.c (symbols_output): Likewise.
1692 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1693
bdef2a41
AD
16942001-12-10 Akim Demaille <akim@epita.fr>
1695
1696 * src/muscle_tab.c (muscle_init): NULL is a better default than
1697 `"0"'.
1698
3735969c
AD
16992001-12-10 Akim Demaille <akim@epita.fr>
1700
1701 * src/reader.c (reader): Calling symbols_output once is enough.
1702
49701457
AD
17032001-12-10 Akim Demaille <akim@epita.fr>
1704
1705 Now that states have a complete set of members, the linked list of
1706 reductions is useless: just fill directly the state's reductions
1707 member.
1708
1709 * src/state.h (struct reductions): Remove member `number' and
1710 `next'.
1711 * src/LR0.c (first_reduction, last_reduction): Remove.
1712 (save_reductions): Don't link the new reductions, store them in
1713 this_state.
1714 * src/lalr.c (set_state_table): No need to attach reductions to
1715 states, it's already done.
1716 * src/output.c (output_actions): No longer free the shifts, then
1717 the reductions, then the states: free all the states and their
1718 members.
1719
0edad749
AD
17202001-12-10 Akim Demaille <akim@epita.fr>
1721
1722 * src/options.c (OPTN, DRTV, BOTH): New.
1723 (option_table): Use them.
1724
0edad749
AD
1725 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1726 the job of system.h.
1727 * src/options.c: Don't include stdio.h and xalloc.h for the same
1728 reasons.
1729
5449dd0f
AD
17302001-12-10 Akim Demaille <akim@epita.fr>
1731
1732 * src/output.c (output, prepare): Make sure the values of the
1733 muscles `action' and `prologue' are 0-terminated.
1734
a870c567
AD
17352001-12-10 Akim Demaille <akim@epita.fr>
1736
1737 Clean up GCC warnings.
1738
1739 * src/reader.c (copy_action): `buf' is not used.
1740 (parse_skel_decl): Be static.
1741 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1742 * src/options.h (create_long_option_table): Have a real prototype.
1743 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1744 (hash_delete_at): Return const void *.
1745 Adjust casts to preserve the const.
1746
80df8768
AD
17472001-12-10 Akim Demaille <akim@epita.fr>
1748
1749 * configure.in: Require 2.52g.
1750 M4 is not needed, but AUTOM4TE is.
1751 * m4/m4.m4: Remove.
1752 * tests/Makefile.am: Adjust.
1753
f693ad14
AD
17542001-12-10 Akim Demaille <akim@epita.fr>
1755
1756 One structure for states is enough, even though theoretically
1757 there are LR(0) states and LALR(1) states.
1758
1759 * src/lalr.h (state_t): Remove.
1760 (state_table): Be state_t **, not state_t *.
1761 * src/state.h (core, CORE_ALLOC): Rename as...
1762 (state_t, STATE_ALLOC): this.
1763 Add the LALR(1) members: shifts, reductions, errs.
1764 * src/LR0.c (state_table): Rename as...
1765 (state_hash): this, to avoid name clashes with the global
1766 `state_table'.
1767 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1768 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1769
74ffbcb6
AD
17702001-12-10 Akim Demaille <akim@epita.fr>
1771
1772 Bison dumps core on bash.y.
1773 Reported by Pascal Bart.
1774
1775 * src/warshall.c (bitmatrix_print): New.
1776 (TC): Use it.
1777 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1778 j must be the outer loop.
1779 * tests/regression.at (Broken Closure): New.
1780
07708e19
AD
17812001-12-05 Akim Demaille <akim@epita.fr>
1782
1783 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1784 its argument.
1785