]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/LR0.c (new_state): Display `nstates' as the name of the
[bison.git] / ChangeLog
CommitLineData
643a5994
AD
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/LR0.c (new_state): Display `nstates' as the name of the
4 newly created state.
5 Adjust to initialize first_state and last_state if needed.
6 Be sure to distinguish the initial from the final state.
7 (new_states): Create the itemset of the initial state, and use
8 new_state.
9 * src/closure.c (closure): Now that the initial state has its
10 items properly set, there is no need for a special case when
11 creating `ruleset'.
12
13 As a result, now the rule 0, reducing to $axiom, is visible in the
14 outputs. Adjust the test suite.
15
16 * tests/conflicts.at (Solved SR Conflicts)
17 (Unresolved SR Conflicts): Adjust.
18 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19 * tests/conflicts.at (S/R in initial): New.
20
b4c4ccc2
AD
212002-04-07 Akim Demaille <akim@epita.fr>
22
23 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
24 the RHS of the rules.
25 * src/output.c (output_gram): Likewise.
26
bba97eb2
AD
272002-04-07 Akim Demaille <akim@epita.fr>
28
29 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
30 bucket.
31 Adjust all dependencies.
32 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
33 `number' of the buckets too.
34 * src/gram.h: Include `symtab.h'.
35 (associativity): Move to...
36 * src/symtab.h: here.
37 No longer include `gram.h'.
38
39
c3b407f4
AD
402002-04-07 Akim Demaille <akim@epita.fr>
41
42 * src/gram.h, src/gram.c (rules_rhs_length): New.
43 (ritem_longest_rhs): Use it.
44 * src/gram.h (rule_t): `number' is a new member.
45 * src/reader.c (packgram): Set it.
46 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
47 the end of `rules', and count them out of `nrules'.
48 (reduce_output, dump_grammar): Adjust.
49 * src/print.c (print_grammar): It is no longer needed to check for
50 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
51 * tests/reduce.at (Reduced Automaton): New test.
52
11652ab3
AD
532002-04-07 Akim Demaille <akim@epita.fr>
54
55 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
56 lacking `+ 1' to nrules, Bison reported as useless a token if it
57 was used solely to set the precedence of the last rule...
58
26b23c1a
AD
592002-04-07 Akim Demaille <akim@epita.fr>
60
61 * data/bison.c++, data/bison.simple: Don't output the current file
62 name in #line, to avoid useless diffs between two identical
63 outputs under different names.
64
18bcecb0
AD
652002-04-07 Akim Demaille <akim@epita.fr>
66
67 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
68 Normalize loops to using `< nrules + 1', not `<= nrules'.
69
fa770c86
AD
702002-04-07 Akim Demaille <akim@epita.fr>
71
72 * TODO: Update.
73
d9b739c3
AD
742002-04-07 Akim Demaille <akim@epita.fr>
75
76 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
77 bucket.value as bucket.number.
78
99013900
AD
792002-04-07 Akim Demaille <akim@epita.fr>
80
81 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
82 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
83 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
84 RHS, instead of being an index in RITEMS.
85
e966383b
PE
862002-04-04 Paul Eggert <eggert@twinsun.com>
87
88 * doc/bison.texinfo: Update copyright date.
89 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
90 (Symbols): Warn about running Bison in one character set,
91 but compiling and/or running in an incompatible one.
92 Warn about character code 256, too.
93
942002-04-03 Paul Eggert <eggert@twinsun.com>
95
96 * src/bison.data (YYSTACK_ALLOC): Depend on whether
97 YYERROR_VERBOSE is nonzero, not whether it is defined.
98
99 Merge changes from bison-1_29-branch.
c307773e 100
8d6c48b9
PE
1012002-03-20 Paul Eggert <eggert@twinsun.com>
102
103 Merge fixes from Debian bison_1.34-1.diff.
104
105 * configure.in (AC_PREREQ): 2.53.
106
e53c6322
AD
1072002-03-20 Akim Demaille <akim@epita.fr>
108
109 * src/conflicts.c (log_resolution): Argument `resolution' is const.
110
9ffbeca7
PE
1112002-03-19 Paul Eggert <eggert@twinsun.com>
112
21db0b2a
PE
113 * src/bison.simple (YYCOPY): New macro.
114 (YYSTACK_RELOCATE): Use it.
115 Remove Type arg; no longer needed. All callers changed.
116 (yymemcpy): Remove; no longer needed.
117
9ffbeca7
PE
118 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
119 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
120
642cb8f8
AD
1212002-03-19 Akim Demaille <akim@epita.fr>
122
123 Test and fix the #line outputs.
124
125 * tests/atlocal.at (GCC): New.
126 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
127 (Prologue synch line, ,%union synch line, Postprologue synch line)
128 (Action synch line, Epilogue synch line): New tests.
129 * src/reader.c (parse_union_decl): Define the muscle stype_line.
130 * data/bison.simple, data/bison.c++: Use it.
131
3c31a486
AD
1322002-03-19 Akim Demaille <akim@epita.fr>
133
134 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
135 (Solved SR Conflicts, %expect not enough, %expect right)
136 (%expect too much): Move to...
137 * tests/conflicts.at: this new file.
138
0d8bed56
AD
1392002-03-19 Akim Demaille <akim@epita.fr>
140
141 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
142 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
143 that we can move to enums for instance.
144 * src/output.c (token_definitions_output): Output a list of
145 `token-name, token-number' instead of the #define.
146 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
147
9208d17f
AD
1482002-03-14 Akim Demaille <akim@epita.fr>
149
150 Use Gettext 0.11.1.
151
af27eacb
RA
1522002-03-09 Robert Anisko <robert@lrde.epita.fr>
153
154 * data/bison.c++: Make the user able to add members to the generated
155 parser by subclassing.
156
9101a310
RA
1572002-03-05 Robert Anisko <robert@lrde.epita.fr>
158
159 * src/reader.c (read_additionnal_code): `c' should be an integer, not
160 a character.
161 Reported by Nicolas Tisserand and Nicolas Burrus.
162
fff9bf0b
RA
1632002-03-04 Robert Anisko <robert@lrde.epita.fr>
164
165 * src/reader.c: Warn about lacking semi-colons, do not complain.
166
64dba31e
RA
1672002-03-04 Robert Anisko <robert@lrde.epita.fr>
168
169 * data/bison.c++: Remove a debug line.
170
374f5a14
RA
1712002-03-04 Robert Anisko <robert@lrde.epita.fr>
172
173 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
174 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
175 provide a default implementation.
176
bfcf1f3a
AD
1772002-03-04 Akim Demaille <akim@epita.fr>
178
179 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
180 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
181 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
182 * tests/semantic.at (Parsing Guards): Similarly.
183 * src/reader.at (readgram): Complain if the last rule is not ended
184 with a semi-colon.
185
65ccf9fc
AD
1862002-03-04 Akim Demaille <akim@epita.fr>
187
188 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
189 * src/closure.c: here.
190 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
191 RTC.
192 * src/warshall.h, src/warshall.c: Remove.
193 * tests/sets.at (Broken Closure): Adjust.
194
d0039cbc
AD
1952002-03-04 Akim Demaille <akim@epita.fr>
196
197 * src/output.c (output_skeleton): tempdir is const.
198 bytes_read is unused.
199
345cea78
AD
2002002-03-04 Akim Demaille <akim@epita.fr>
201
202 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
203 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
204 Update.
205 From Michael Hayes.
206
564801f7
AD
2072002-03-04 Akim Demaille <akim@epita.fr>
208
209 * src/closure.c (closure): `r' is unused.
210
e5352bc7
AD
2112002-03-04 Akim Demaille <akim@epita.fr>
212
213 * tests/sets.at (Broken Closure): Add the ending `;'.
214 * src/reader.at (readgram): Complain if a rule is not ended with a
215 semi-colon.
216
914feea9
AD
2172002-03-04 Akim Demaille <akim@epita.fr>
218
219 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
220 (count_sr_conflicts): Use bitset_count.
221 * src/reduce.c (inaccessable_symbols): Ditto.
222 (bits_size): Remove.
223 * src/warshall.h, src/warshall.c: Convert to bitsetv.
224
f0250de6
AD
2252002-03-04 Akim Demaille <akim@epita.fr>
226
227 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
228 * src/reduce.c: Remove the `bitset_zero's following the
229 `bitset_create's, as now it is performed by the latter.
230
ef017502
AD
2312002-03-04 Akim Demaille <akim@epita.fr>
232
233 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
234 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
235 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
236 latest sources from Michael.
237
76514394
AD
2382002-03-04 Akim Demaille <akim@epita.fr>
239
240 * src/output.c (output): Don't free the grammar.
241 * src/reader.c (grammar_free): New.
242 * src/main.c (main): Call it and don't free symtab here.
243
55024580
AD
2442002-03-04 Akim Demaille <akim@epita.fr>
245
246 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
247 before returning.
248 Reported by Benoit Perrot.
249
f9abaa2c
AD
2502002-03-04 Akim Demaille <akim@epita.fr>
251
252 Use bitset operations when possible, not loops over bits.
253
254 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
255 bitset_or.
256 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
257 * src/reduce.c (useless_nonterminals): Formatting changes.
258 * src/warshall.c (TC): Use bitset_or.
259
0e721e75
AD
2602002-03-04 Akim Demaille <akim@epita.fr>
261
262 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
263 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
264 Ditto.
265
0fb1ffb1
AD
2662002-03-04 Akim Demaille <akim@epita.fr>
267
268 * src/lalr.c (F): Now a bitset*.
269 Adjust all dependencies.
270
b86796bf
AD
2712002-03-04 Akim Demaille <akim@epita.fr>
272
273 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
274 Adjust all dependencies.
275
602bbf31
AD
2762002-03-04 Akim Demaille <akim@epita.fr>
277
278 * src/L0.c, src/LR0.h (nstates): Be size_t.
279 Adjust comparisons (signed vs unsigned).
280 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
281 bitset*.
282 Adjust all dependencies.
283
d8a0245c
AD
2842002-03-04 Akim Demaille <akim@epita.fr>
285
286 * src/closure.c (firsts): Now, also a bitset.
287 Adjust all dependencies.
288 (varsetsize): Remove, now unused.
289 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
290
34ba9743
AD
2912002-03-04 Akim Demaille <akim@epita.fr>
292
293 * src/print.c: Convert to use bitset.h, not hand coded iterations
294 over ints.
295
ed86e78c
AD
2962002-03-04 Akim Demaille <akim@epita.fr>
297
298 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
299
dfdb1797
AD
3002002-03-04 Akim Demaille <akim@epita.fr>
301
302 * src/closure.c (ruleset): Be a bitset.
303 (rulesetsize): Remove.
304
7086e707
AD
3052002-03-04 Akim Demaille <akim@epita.fr>
306
307 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
308 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
309 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
310 * src/closure.c (fderives): Be an array of bitsets.
311
98254360
RA
3122002-02-28 Robert Anisko <robert@lrde.epita.fr>
313
314 * data/bison.c++: Merge the two generated headers. Insert a copyright
315 notice in each output file.
316
a75c057f
AD
3172002-02-28 Akim Demaille <akim@epita.fr>
318
319 * data/bison.c++: Copy the prologue of bison.simple to fetch
320 useful M4 definitions, such as b4_header_guard.
321
06b00abc
AD
3222002-02-25 Akim Demaille <akim@epita.fr>
323
324 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
325 translator friendly scheme for the bgr
326 copyright notice.
06b00abc 327
70e7d534
AD
3282002-02-25 Akim Demaille <akim@epita.fr>
329
330 * src/output.c (header_output): Remove, now handled completely via
331 M4.
332
abe017f6
AD
3332002-02-25 Akim Demaille <akim@epita.fr>
334
335 * m4/m4.m4: New, from CVS Autoconf.
336 * configure.in: Invoke it.
337 * src/output.c (output_skeleton): Use its result instead of the
338 hard coded name.
339
381fb12e
AD
3402002-02-25 Akim Demaille <akim@epita.fr>
341
342 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
343 Fileutils 4.1.5.
344 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
345 * src/output.c (output_skeleton): Use mkstemp to create a real
346 temporary file.
347 Move the filling of `skeleton' and its muscle to...
348 (prepare): here.
349 (output): Move the definition of the prologue muscle to...
350 (prepare): here.
351 * src/system.h (DEFAULT_TMPDIR): New.
352
6f38107f
PE
3532002-02-14 Paul Eggert <eggert@twinsun.com>
354
355 Remove the support for C++ namespace cleanliness; it was
356 causing more problems than it was curing, since it didn't work
357 properly on some nonstandard C++ compilers. This can wait
358 for a proper C++ parser.
359
360 * NEWS: Document this.
361 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
362 of C++, as it's treated like C now.
363 * src/bison.simple (YYSTD): Remove.
364 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
365 Treat C++ just like Standard C instead of trying to support
366 namespace cleanliness.
367
80cce3da
AD
3682002-02-14 Akim Demaille <akim@epita.fr>
369
370 * tests/regression.at (else): Adjust to Andreas' change.
371
842e8679
AD
3722002-02-14 Akim Demaille <akim@epita.fr>
373
374 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
375
4bda3f10
AD
3762002-02-13 Andreas Schwab <schwab@suse.de>
377
378 * src/output.c (output_rule_data): Don't output NULL, it might
379 not be defined yet.
380
4162fa07 3812002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 382
4162fa07
RA
383 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
384 (Copyright notice): Update.
b418ecd8 385
bd16a5dc
AD
3862002-02-11 Akim Demaille <akim@epita.fr>
387
388 * tests/regression.at (%nonassoc and eof): Don't include
389 nonportable headers.
390
8d69a1a3
RA
3912002-02-08 Robert Anisko <robert@lrde.epita.fr>
392
393 * data/bison.c++: Correct error recovery. Make the user able to
394 initialize the starting location.
395
9b2d0677
AD
3962002-02-07 Akim Demaille <akim@epita.fr>
397
398 * tests/input.at: New.
399
69e2658b
RA
4002002-02-07 Robert Anisko <robert@lrde.epita.fr>
401
402 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 403 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
404 directives around tables only needed for debugging.
405
4aacc3a7
RA
4062002-02-07 Robert Anisko <robert@lrde.epita.fr>
407
408 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
409 C++ parsers.
410 (yy::b4_name::parse): Use print_.
411
762a801e
RA
4122002-02-07 Robert Anisko <robert@lrde.epita.fr>
413
414 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
415
4bb2bc3f
RA
4162002-02-07 Robert Anisko <robert@lrde.epita.fr>
417
418 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
419 C++ parsers.
420 (yy::b4_name::parse): Build verbose error messages, and use error_.
421
6b45a3ca
RA
4222002-02-06 Robert Anisko <robert@lrde.epita.fr>
423
424 * data/bison.c++: Fix m4 quoting in comments.
425
50997c6e
RA
4262002-02-06 Robert Anisko <robert@lrde.epita.fr>
427
428 * data/bison.c++: Adjust the parser code. Fix some muscles that were
429 not expanded by m4.
430
3f3eed27
AD
4312002-02-05 Akim Demaille <akim@epita.fr>
432
433 * data/bison.c++: Adjust to the M4 back end.
434 More is certainly needed.
435
be2a1a68
AD
4362002-02-05 Akim Demaille <akim@epita.fr>
437
438 Give a try to M4 as a back end.
439
440 * lib/readpipe.c: New, from wdiff.
441 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
442 BISON_HAIRY.
443 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
444 specific values. Now it is m4 that performs the lookup.
445 * src/parse-skel.y: Remove.
446 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
447 * src/output.c (actions_output, guards_output)
448 (token_definitions_output): No longer keeps track of the output
449 line number, hence remove the second argument.
450 (guards_output): Check against the guard member of a rule, not the
451 action member.
452 Adjust callers.
453 (output_skeleton): Don't look for the skeleton location, let m4 do
454 that.
455 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
456 file will be used.
457 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
458 (prepare): Given that for the time being changesyntax is not
459 usable in M4, rename the muscles using `-' to `_'.
460 Define `defines_flag', `output_parser_name' and `output_header_name'.
461 * src/output.h (actions_output, guards_output)
462 (token_definitions_output): Adjust prototypes.
463 * src/scan-skel.l: Instead of scanning the skeletons, it now
464 processes the output of m4: `__oline__' and `#output'.
465 * data/bison.simple: Adjust to be used by M4(sugar).
466 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
467 to date.
468 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
469 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
470 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
471 shamelessly stolen from CVS Autoconf.
472
beda758b
AD
4732002-02-05 Akim Demaille <akim@epita.fr>
474
475 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
476 * configure.in: Check for the declarations of free and malloc.
477 * src/muscle_tab.c: Adjust.
478
5ece6d43
AD
4792002-02-05 Akim Demaille <akim@epita.fr>
480
481 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
482 which have no values.
483
5bb18f9a
AD
4842002-02-05 Akim Demaille <akim@epita.fr>
485
486 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
487 * data/: here.
488
894dd62e
PE
4892002-01-29 Paul Eggert <eggert@twinsun.com>
490
491 * src/bison.simple (YYSIZE_T): Do not define merely because
492 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
493 On some platforms, <alloca.h> does not declare YYSTD (size_t).
494
82841af7
AD
4952002-01-27 Akim Demaille <akim@epita.fr>
496
497 Fix `%nonassoc and eof'.
498
499 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
500 which were not properly copied! Replace
501 memcpy (res->errs, src->errs, src->nerrs);
502 with
503 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
504 !!!
505 * tests/regression.at (%nonassoc and eof): Adjust to newest
506 Autotest: `.' is not in the PATH.
507
318b76e9
AD
5082002-01-27 Akim Demaille <akim@epita.fr>
509
510 * tests/sets.at (AT_EXTRACT_SETS): New.
511 (Nullable): Use it.
512 (Firsts): New.
513
30d2f3d5
AD
5142002-01-26 Akim Demaille <akim@epita.fr>
515
516 * tests/actions.at, tests/calc.at, tests/headers.at,
517 * tests/torture.at: Adjust to the newest Autotest which no longer
518 forces `.' in the PATH.
519
30f8c395
AD
5202002-01-25 Akim Demaille <akim@epita.fr>
521
522 * tests/regression.at (%nonassoc and eof): New.
523 Suggested by Robert Anisko.
524
29ae55f1
AD
5252002-01-24 Akim Demaille <akim@epita.fr>
526
527 Bison dumps core when trying to complain about broken input files.
528 Reported by Cris van Pelt.
529
530 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
531 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
532 into...
533 (Invalid inputs): Strengthen: exercise parse_percent_token.
534
2b548aa6
RA
5352002-01-24 Robert Anisko <robert.anisko@epita.fr>
536
537 * src/Makefile.am: Add bison.c++.
538 * src/bison.c++: New skeleton.
539
bb0146c2
AD
5402002-01-21 Paolo Bonzini <bonzini@gnu.org>
541
542 * po/it.po: New.
543
bec30531
AD
5442002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
545
546 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
547
fc6edc45
MA
5482002-01-20 Marc Autret <marc@gnu.org>
549
550 * src/files.c (compute_output_file_names): Fix
551
5e5d5415
MA
5522002-01-20 Marc Autret <marc@gnu.org>
553
554 * tests/output.at: New test.
555 * src/files.c (compute_base_names): Don't map extensions when
556 the YACC flag is set, use defaults.
557 Reported by Evgeny Stambulchik.
558
44ea3fbd
MA
5592002-01-20 Marc Autret <marc@gnu.org>
560
bb0146c2 561 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
562 compilers as well (i.e. the vendor C compiler).
563 Suggested by Albert Chin-A-Young.
564
338963d1
TVH
5652002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
566
567 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
568 canonical definition.
569 * src/system.h: Use the canonical definition for PARAMS (avoids
570 a conflict with the macro from lib/hash.h).
571
c57b2479
AD
5722002-01-11 Akim Demaille <akim@epita.fr>
573
574 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 575 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 576
b85810ae
AD
5772002-01-09 Akim Demaille <akim@epita.fr>
578
579 * src/files.c, src/files.h (output_infix): New.
580 (tab_extension): Remove.
581 (compute_base_names): Compute the former, drop the latter.
582 * src/output.c (prepare): Insert the muscles `output-infix', and
583 `output-suffix'.
584 * src/parse-skel.y (string, string.1): New.
585 (section.header): Use it.
586 (section.yacc): Remove.
587 (prefix): Remove too.
588 * src/scan-skel.l: Adjust.
589 * src/bison.simple, src/bison.hairy: Adjust.
590
cae60122
AD
5912002-01-09 Akim Demaille <akim@epita.fr>
592
593 * configure.in (WERROR_CFLAGS): Compute it.
594 * src/Makefile.am (CFLAGS): Pass it.
595 * tests/atlocal.in (CFLAGS): Idem.
596 * src/files.c: Fix a few warnings.
597 (get_extension_index): Remove, unused.
598
ae404801
AD
5992002-01-08 Akim Demaille <akim@epita.fr>
600
601 * src/getargs.c (AS_FILE_NAME): New.
602 (getargs): Use it to convert DOSish file names.
603 * src/files.c (base_name): Rename as full_base_name to avoid
604 clashes with `base_name ()'.
605 (filename_split): New.
606 (compute_base_names): N-th rewrite, using filename_split.
607
22312b71
AD
6082002-01-08 Akim Demaille <akim@epita.fr>
609
610 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
611 New, stolen from the Fileutils 4.1.
612 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
613 * configure.in: Check for the presence of memrchr, and of its
614 prototype.
615
a67cef01
TVH
6162002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
617
618 * lib/hash.h (__P): Added definition for this macro.
619 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
620 BUILT_SOURCES, to ensure they are generated first.
621 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
622 %error-verbose to allow bootstrapping with bison 1.30x.
623
2b25d624
AD
6242002-01-06 Akim Demaille <akim@epita.fr>
625
626 * src/reader.c (parse_braces): Don't fetch the next char, the
627 convention is to fetch on entry.
628 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
629 'switch' without a following semicolon.
630 * tests/regression.at (braces parsing): New.
631
3460813b
AD
6322002-01-06 Akim Demaille <akim@epita.fr>
633
634 Bison is dead wrong in its RR conflict reports.
635
636 * tests/torture.at (GNU Cim Grammar): New.
637 * src/conflicts.c (count_rr_conflicts): Fix.
638
73784c64
AD
6392002-01-06 Akim Demaille <akim@epita.fr>
640
641 Creating package.m4 from configure.ac causes too many problems.
642
643 * tests/Makefile.am (package.m4): Create it by hand,
644 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
645
25d81090
AD
6462002-01-06 Akim Demaille <akim@epita.fr>
647
648 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
649 skeleton.h.
650
a9b8959e
PE
6512002-01-04 Paul Eggert <eggert@twinsun.com>
652
653 * doc/bison.texinfo (Debugging):
654 Remove YYSTDERR; it's no longer defined or used.
655 Also, s/cstdio.h/cstdio/.
656
25d81090
AD
6572002-01-03 Akim Demaille <akim@epita.fr>
658
659 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
660
1109455c
AD
6612002-01-03 Akim Demaille <akim@epita.fr>
662
663 * src/parse-skel.y (process_skeleton): Don't bind the parser's
664 tracing code to --trace, wait for a better --trace option, with
665 args.
666
7ea5e977
AD
6672002-01-03 Akim Demaille <akim@epita.fr>
668
669 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
670 The ISO C++ standard is extremely clear about it: stderr is
671 considered a macro, not a regular symbol (see table 94 `Header
672 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
673 Therefore std:: does not apply to it. It still does with fprintf.
674 Also, s/cstdio.h/cstdio/.
675
fab5b110
AD
6762002-01-03 Akim Demaille <akim@epita.fr>
677
678 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
679 for non system headers.
680
aed7fd9b
AD
6812002-01-02 Akim Demaille <akim@epita.fr>
682
683 Equip the skeleton chain with location tracking, runtime trace,
684 pure parser and scanner.
685
686 * src/parse-skel.y: Request a pure parser, locations, and prefix
687 renaming.
688 (%union): Having several members with the same type does not help
689 type mismatches, simplify.
690 (YYPRINT, yyprint): New.
691 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
692 (skel_error): this.
693 Handle locations.
694 * src/scan-skel.l: Adjust to these changes.
695 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
696 (LOCATION_PRINT, skel_control_t): New.
697
24fad99e
AD
6982001-12-30 Akim Demaille <akim@epita.fr>
699
700 * src/parse-skel.y: Get rid of the shift/reduce conflict:
701 replace `gb' with BLANKS.
702 * src/scan-skel.l: Adjust.
703
a4b36db4
AD
7042001-12-30 Akim Demaille <akim@epita.fr>
705
706 * src/system.h: We don't need nor want bcopy.
707 Throw away MS-DOS crap: we don't need getpid.
708 * configure.in: We don't need strndup. It was even causing
709 problems: because Flex includes the headers *before* us,
710 _GNU_SOURCE is not defined by config.h, and therefore strndup was
711 not visible.
712 * lib/xstrndup.c: New.
713 * src/scan-skel.l: Use it.
714 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
715 * src/parse-skel.y: Use %directives instead of #defines.
716
1239777d
AD
7172001-12-30 Akim Demaille <akim@epita.fr>
718
719 * src/skeleton.h: New.
720 * src/output.c (output_parser, output_master_parser): Remove, dead
721 code.
722 * src/output.h (get_lines_number, actions_output, guards_output)
723 (token_definitions_output): Prototype them.
724 * src/parse-skel.y: Add the license notice.
725 Include output.h and skeleton.h.
726 (process_skeleton): Returns void, and takes a single parameter.
727 * src/scan-skel.l: Add the license notice.
728 Include skeleton.h.
729 Don't use %option yylineno: it seems that then Flex imagines
730 REJECT has been used, and therefore it won't reallocate its
731 buffers (which makes no other sense to me than a bug). It results
732 in warnings for `unused: yy_flex_realloc'.
733
9b3add5b
RA
7342001-12-30 Robert Anisko <robert.anisko@epita.fr>
735
736 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
737 (MUSCLE_INSERT_PREFIX): ...to there.
738 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
739 (MUSCLE_INSERT_PREFIX): Move from here...
740
741 * src/bison.hairy: Add a section directive. Put braces around muscle
742 names. This parser skeleton is still broken, but Bison should not
743 choke on a bad muscle 'syntax'.
744 * src/bison.simple: Add a section directive. Put braces around muscle
745 names.
746
747 * src/files.h (strsuffix, stringappend): Add declarations.
748 (tab_extension): Add declaration.
749 (short_base_name): Add declaration.
750
751 * src/files.c (strsuffix, stringappend): No longer static. These
752 functions are used in the skeleton parser.
753 (tab_extension): New.
754 (compute_base_names): Use the computations done in this function
fab5b110 755 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
756 names.
757 (short_base_name): No longer static.
758
759 * src/output.c (output_skeleton): New.
760 (output): Disable call to output_master_parser, and give a try to
761 a new skeleton handling system.
762 (guards_output, actions_output): No longer static.
763 (token_definitions_output, get_lines_number): No longer static.
764
765 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
766
fab5b110 767 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
768 parse-skel.y.
769
770 * src/parse-skel.y: New file.
771 * src/scan-skel.l: New file.
772
b5b61c61
AD
7732001-12-29 Akim Demaille <akim@epita.fr>
774
775 %name-prefix is broken.
776
777 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
778 Adjust all dependencies.
779 * tests/headers.at (export YYLTYPE): Strengthen this test: use
780 %name-prefix.
781
782 Renaming yylval but not yylloc is not consistent. Now we do.
783
784 * src/bison.simple: Prefix yylloc if used.
785 * doc/bison.texinfo (Decl Summary): Document that.
786
8c9a50be
AD
7872001-12-29 Akim Demaille <akim@epita.fr>
788
789 * doc/bison.texinfo: Promote `%long-directive' over
790 `%long_directive'.
791 Remove all references to fixed-output-files, yacc is enough.
792
d99361e6
AD
7932001-12-29 Akim Demaille <akim@epita.fr>
794
795 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
796 user prologue. These are defaults.
797 * tests/actions.at (Mid-rule actions): Make sure the user can
798 define YYDEBUG and YYERROR_VERBOSE.
799
b9cecb91
AD
8002001-12-29 Akim Demaille <akim@epita.fr>
801
802 * src/output.c (header_output): Don't forget to export YYLTYPE and
803 yylloc.
804 * tests/headers.at (export YYLTYPE): New, make sure it does.
805 * tests/regression.at (%union and --defines, Invalid CPP headers):
806 Move to...
807 * tests/headers.at: here.
808
aea13e97
AD
8092001-12-29 Akim Demaille <akim@epita.fr>
810
811 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
812
931394cb
AD
8132001-12-29 Akim Demaille <akim@epita.fr>
814
815 * tests/actions.at (Mid-rule actions): Output on a single line
816 instead of several.
817
704a47c4
AD
8182001-12-29 Akim Demaille <akim@epita.fr>
819
820 * doc/bison.texinfo: Formatting changes.
821
091e20bb
AD
8222001-12-29 Akim Demaille <akim@epita.fr>
823
824 Don't store the token defs in a muscle, just be ready to output it
825 on command. Now possible via `symbols'. Fixes a memory leak.
826
827 * src/output.c (token_definitions_output): New.
828 (output_parser, header_output): Use it.
829 * src/reader.c (symbols_save): Remove.
830
cce71710
AD
8312001-12-29 Akim Demaille <akim@epita.fr>
832
833 * src/bison.simple: Do not provide a default for YYSTYPE and
834 YYLTYPE before the user's prologue. Otherwise it's hardly... a
835 default.
836
82c035a8
AD
8372001-12-29 Akim Demaille <akim@epita.fr>
838
839 Mid-rule actions are simply... ignored!
840
841 * src/reader.c (readgram): Be sure to attach mid-rule actions to
842 the empty-rule associated to the dummy symbol, not to the host
843 rule.
844 * tests/actions.at (Mid-rule actions): New.
845
8419d367
AD
8462001-12-29 Akim Demaille <akim@epita.fr>
847
848 Memory leak.
849
850 * src/reader.c (reader): Free grammar.
851
375d5806
AD
8522001-12-29 Akim Demaille <akim@epita.fr>
853
854 Memory leak.
855
856 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
857 since it allocates it for each state, although only one is needed.
858 (allocate_storage): Do it here.
859
f51cb8ff
AD
8602001-12-29 Akim Demaille <akim@epita.fr>
861
862 * src/options.h, src/options.c (create_long_option_table): Rename
863 as...
864 (long_option_table_new): this, with a clearer prototype.
865 (percent_table): Remove, unused,
866 * src/getargs.c (getargs): Adjust.
867
29e88316
AD
8682001-12-29 Akim Demaille <akim@epita.fr>
869
870 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
871 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
872 as states.
873
b9f71f19
AD
8742001-12-29 Akim Demaille <akim@epita.fr>
875
876 * src/lalr.c (build_relations): Rename `states' as `states1'.
877 Sorry, I don't understand exactly what it is, no better name...
878
1a2b5d37
AD
8792001-12-29 Akim Demaille <akim@epita.fr>
880
881 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
882 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
883 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
884 as rules.
885
1cca533e
AD
8862001-12-29 Akim Demaille <akim@epita.fr>
887
888 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
889 ago.
890
c03ae966
AD
8912001-12-29 Akim Demaille <akim@epita.fr>
892
893 * src/reader.c, src/reader.h (user_toknums): Remove.
894 Adjust all users to use symbols[i]->user_token_number.
895
5a670b1e
AD
8962001-12-29 Akim Demaille <akim@epita.fr>
897
898 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
899 Adjust all users to use symbols[i]->prec or ->assoc.
900
ad949da9
AD
9012001-12-29 Akim Demaille <akim@epita.fr>
902
903 * src/reader.c, src/reader.h (tags): Remove.
904 Adjust all users to use symbols[i]->tag.
905
0e78e603
AD
9062001-12-29 Akim Demaille <akim@epita.fr>
907
908 * src/gram.h, src/gram.c (symbols): New, similar to state_table
909 and rule_table.
910 * src/reader.c (packsymbols): Fill this table.
911 Drop sprec.
912 * src/conflicts.c (resolve_sr_conflict): Adjust.
913 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
914 single table.
915 Use symbols[i]->tag instead of tags[i].
916
213e640e
AD
9172001-12-29 Akim Demaille <akim@epita.fr>
918
919 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
920 In addition, put a comment in there, to replace...
921 * tests/regression.at (%union and C comments): Remove.
922
e7b8bef1
AD
9232001-12-29 Akim Demaille <akim@epita.fr>
924
925 * tests/regression.at (Web2c Actions): Blindly move the actual
926 output as expected output. The contents *seem* right to me, but I
927 can't pretend reading perfectly parser tables... Nonetheless, all
928 the other tests pass correctly, the table look OK, even though the
929 presence of `$axiom' is to be noted: AFAICS it is useless (but
930 harmless).
931
b68e7744
AD
9322001-12-29 Akim Demaille <akim@epita.fr>
933
934 * src/reader.c (readgram): Don't add the rule 0 if there were no
935 rules read. In other words, add it _after_ having performed
936 grammar sanity checks.
937 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
938
78d5bae9
AD
9392001-12-29 Akim Demaille <akim@epita.fr>
940
941 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
942 visible, and some states have now a different number.
943
ff442794
AD
9442001-12-29 Akim Demaille <akim@epita.fr>
945
946 * src/reader.c (readgram): Bind the initial rule's lineno to that
947 of the first rule.
948 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
949 (Solved SR Conflicts): Adjust rule 0's line number.
950
610ab194
AD
9512001-12-29 Akim Demaille <akim@epita.fr>
952
953 Fix the `GAWK Grammar' failure.
954
955 * src/LR0.c (final_state): Initialize to -1 so that we do compute
956 the reductions of the first state which was mistakenly confused
957 with the final state because precisely final_state was initialized
958 to 0.
959 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
960 now noticed by Bison.
961 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
962 have a reduction on $default.
963
29d29c8f
AD
9642001-12-29 Akim Demaille <akim@epita.fr>
965
966 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
967 rule line numbers.
968 * src/closure.c (print_closure): Likewise.
969 * src/derives.c (print_derives): Likewise.
970 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
971 now.
972
7c6b64d0
AD
9732001-12-29 Akim Demaille <akim@epita.fr>
974
975 * src/lalr.c (lookaheads_print): New.
976 (lalr): Call it when --trace-flag.
977 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
978 are dumped.
979
3d4daee3
AD
9802001-12-29 Akim Demaille <akim@epita.fr>
981
982 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
983 when walking through ritem, even via rule->rhs.
984 * src/reduce.c (dump_grammar, useful_production, reduce_output)
985 (useful_production, useless_nonterminals): Likewise.
986 (reduce_grammar_tables): Likewise, plus update nritems.
987 * src/nullable.c (set_nullable): Likewise.
988 * src/lalr.c (build_relations): Likewise.
989 * tests/sets.at (Nullable): Adjust.
990 Fortunately, now, the $axiom is no longer nullable.
991
9e7f6bbd
AD
9922001-12-29 Akim Demaille <akim@epita.fr>
993
994 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
995 the 0-sentinel.
996 * src/gram.c (ritem_longest_rhs): Likewise.
997 * src/reduce.c (nonterminals_reduce): Likewise.
998 * src/print_graph.c (print_graph): Likewise.
999 * src/output.c (output_rule_data): Likewise.
1000 * src/nullable.c (set_nullable): Likewise.
1001
255ef638
AD
10022001-12-29 Akim Demaille <akim@epita.fr>
1003
1004 * src/output.c: Comment changes.
1005
0d8a7363
AD
10062001-12-27 Paul Eggert <eggert@twinsun.com>
1007
1008 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1009 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1010 Sparc, as they were causing more porting problems than the
1011 (minor) performance improvement was worth.
1012
1013 Also, catch up with 1.31's YYSTD.
1014
3db472b9
AD
10152001-12-27 Akim Demaille <akim@epita.fr>
1016
1017 * src/output.c (output_gram): Rely on nritems, not the
1018 0-sentinel. See below.
1019 Use -1 as separator, not 0.
1020 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1021 Rely on -1 as separator in yyrhs, instead of 0.
1022 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1023 twice `Now at end of input', therefore there are two lines less to
1024 expect.
1025
b365aa05
AD
10262001-12-27 Akim Demaille <akim@epita.fr>
1027
1028 * tests/regression.at (Unresolved SR Conflicts):
1029 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1030 below.
1031
30171f79
AD
10322001-12-27 Akim Demaille <akim@epita.fr>
1033
1034 * src/LR0.c (new_state): Recognize the final state by the fact it
1035 is reached by eoftoken.
1036 (insert_start_shifting_state, insert_eof_shifting_state)
1037 (insert_accepting_state, augment_automaton): Remove, since now
1038 these states are automatically computed from the initial state.
1039 (generate_states): Adjust.
1040 * src/print.c: When reporting a rule number to the user, substract
1041 1, so that the axiom rule is rule 0, and the first user rule is 1.
1042 * src/reduce.c: Likewise.
1043 * src/print_graph.c (print_core): For the time being, just as for
1044 the report, depend upon --trace-flags to dump the full set of
1045 items.
1046 * src/reader.c (readgram): Once the grammar read, insert the rule
1047 0: `$axiom: START-SYMBOL $'.
1048 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1049 number of the states has changed (the final state is no longer
1050 necessarily the last), catch up.
1051
75142d45
AD
10522001-12-27 Akim Demaille <akim@epita.fr>
1053
1054 Try to make the use of the eoftoken valid. Given that its value
1055 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1056 is used instead of > 0 where appropriate, (ii), depend upon nritems
1057 instead of the 0-sentinel.
1058
1059 * src/gram.h, src/gram.c (nritems): New.
1060 Expected to be duplication of nitems, but for the time being...
1061 * src/reader.c (packgram): Assert nritems and nitems are equal.
1062 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1063 * src/closure.c (print_closure, print_fderives): Likewise.
1064 * src/gram.c (ritem_print): Likewise.
1065 * src/print.c (print_core, print_grammar): Likewise.
1066 * src/print_graph.c: Likewise.
1067
b7c49edf
AD
10682001-12-27 Akim Demaille <akim@epita.fr>
1069
1070 * src/main.c (main): If there are complains after grammar
1071 reductions, then output the report anyway if requested, then die.
1072 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1073 * src/reader.c (eoftoken): New.
1074 (parse_token_decl): If the token being defined has value `0', it
1075 is the eoftoken.
1076 (packsymbols): No longer hack `tags' to insert `$' by hand.
1077 Be sure to preserve the value of the eoftoken.
1078 (reader): Make sure eoftoken is defined.
1079 Initialize nsyms to 0: now eoftoken is created just like the others.
1080 * src/print.c (print_grammar): Don't special case the eof token.
1081 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1082 lie anyway, albeit pleasant.
1083 * tests/calc.at: Exercise error messages with eoftoken.
1084 Change the grammar so that empty input is invalid.
1085 Adjust expectations.
1086 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1087
ec2da99f
AD
10882001-12-27 Akim Demaille <akim@epita.fr>
1089
1090 * configure.in: Check the protos of strchr ans strspn.
1091 Replace strchr if needed.
1092 * src/system.h: Provide the protos of strchr, strspn and memchr if
1093 missing.
1094 * lib/strchr.c: New.
1095 * src/reader.c (symbols_save): Use strchr.
1096
8adfa272
AD
10972001-12-27 Akim Demaille <akim@epita.fr>
1098
1099 * src/print.c, src/print_graph.c (escape): New.
1100 Use it to quote the TAGS outputs.
1101 * src/print_graph.c (print_state): Now errors are in red, and
1102 reductions in green.
1103 Prefer high to wide: output the state number on a line of its own.
1104
80dac38c
AD
11052001-12-27 Akim Demaille <akim@epita.fr>
1106
1107 * src/state.h, src/state.c (reductions_new): New.
1108 * src/LR0.c (set_state_table): Let all the states have a
1109 `reductions', even if reduced to 0.
1110 (save_reductions): Adjust.
1111 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1112 * src/print.c (print_reductions, print_actions): Adjust.
1113 * src/output.c (action_row): Adjust.
1114
2cec70b9
AD
11152001-12-27 Akim Demaille <akim@epita.fr>
1116
1117 * src/state.h, src/state.c (errs_new, errs_dup): New.
1118 * src/LR0.c (set_state_table): Let all the states have an errs,
1119 even if reduced to 0.
1120 * src/print.c (print_errs, print_reductions): Adjust.
1121 * src/output.c (output_actions, action_row): Adjust.
1122 * src/conflicts.c (resolve_sr_conflict): Adjust.
1123
13ca549a
AD
11242001-12-27 Akim Demaille <akim@epita.fr>
1125
1126 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1127
5092aba5
AD
11282001-12-27 Akim Demaille <akim@epita.fr>
1129
1130 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1131 * src/print.c: here.
1132 (lookaheadset, shiftset): New, used as additional storage by
1133 print_reductions.
1134 (print_results): Adjust.
1135 (print_shifts, print_gotos, print_errs): New, extracted from...
1136 (print_actions): here.
1137 * src/print_graph.c (print_actions): Remove dead code.
1138
11e2beca
AD
11392001-12-27 Akim Demaille <akim@epita.fr>
1140
1141 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1142 `$n' and `@n'.
1143
dac3c910
AD
11442001-12-27 Akim Demaille <akim@epita.fr>
1145
1146 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1147 (build_relations): Adjust.
1148
d0b0fefa
AD
11492001-12-27 Akim Demaille <akim@epita.fr>
1150
1151 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1152 duplication.
1153
adc8c848
AD
11542001-12-27 Akim Demaille <akim@epita.fr>
1155
1156 * src/reader.c (packgram): Catch nitems overflows.
1157
14d293ac
AD
11582001-12-27 Akim Demaille <akim@epita.fr>
1159
1160 * src/files.c, src/files.h (guard_obstack): Remove.
1161 * src/output.c (output): Adjust.
1162 * src/reader.c (parse_braces): New, factoring...
1163 (copy_action, copy_guard): these two which are renamed as...
1164 (parse_action, parse_guard): these.
1165 As a voluntary consequence, using braces around guards is now
1166 mandatory.
1167
f499b062
AD
11682001-12-27 Akim Demaille <akim@epita.fr>
1169
1170 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1171 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1172 members.
1173 (symbol_list_new): Adjust.
1174 (copy_action): action_line is the first line, not the last.
1175 (copy_guard): Just as for actions, store the `action' only, not
1176 the switch/case/break flesh.
1177 Don't parse the user action that might follow the guard, let...
1178 (readgram): do it, i.e., now, there can be an action after a
1179 guard.
1180 In other words the guard is just explicitly optional.
1181 (packgram): Adjust.
1182 * src/output.c (guards_output): New.
1183 (output_parser): Call it when needed.
1184 (output): Also free the guard and attrs obstacks.
1185 * src/files.c, src/files.h (obstack_save): Remove.
1186 (output_files): Remove.
1187 As a result, if one needs the former `.act' file, using an
1188 appropriate skeleton which requires actions and guards is now
1189 required.
1190 * src/main.c (main): Adjust.
1191 * tests/semantic.at: New.
1192 * tests/regression.at: Use `input.y' as input file name.
1193 Avoid 8+3 problems by requiring input.c when the test needs the
1194 parser.
1195
d945f5cd
AD
11962001-12-27 Akim Demaille <akim@epita.fr>
1197
1198 * src/reader.c (symbol_list_new): Be sure to initialize all the
1199 fields.
1200
d200e455
AD
12012001-12-27 Akim Demaille <akim@epita.fr>
1202
1203 All the hacks using a final pseudo state are now useless.
1204
1205 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1206 * src/lalr.c (nLA): New.
1207 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1208 instead of lookaheadsp from the pseudo state (nstate + 1).
1209
f9507c28
AD
12102001-12-27 Akim Demaille <akim@epita.fr>
1211
1212 * src/output.c (action_row, token_actions): Use a state_t instead
1213 of a integer, and nlookaheads instead of the following state's
1214 lookaheadsp.
1215
065fbd27
AD
12162001-12-27 Akim Demaille <akim@epita.fr>
1217
1218 * src/conflicts.c (log_resolution, flush_shift)
1219 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1220 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1221 (conflicts_print, print_reductions): Use a state_t instead of an
1222 integer when referring to a state.
1223 As much as possible, depend upon nlookaheads, instead of the
1224 `lookaheadsp' member of the following state (since lookaheads of
1225 successive states are successive, the difference between state n + 1
1226 and n served as the number of lookaheads for state n).
1227 * src/lalr.c (add_lookback_edge): Likewise.
1228 * src/print.c (print_core, print_actions, print_state)
1229 (print_results): Likewise.
1230 * src/print_graph.c (print_core, print_actions, print_state)
1231 (print_graph): Likewise.
1232 * src/conflicts.h: Adjust.
1233
1b177bd7
AD
12342001-12-27 Akim Demaille <akim@epita.fr>
1235
1236 * src/bison.hairy: Formatting/comment changes.
1237 ANSIfy.
1238 Remove `register' indications.
1239 Add plenty of `static'.
1240
7742ddeb
AD
12412001-12-27 Akim Demaille <akim@epita.fr>
1242
1243 * src/output.c (prepare): Drop the muscle `ntbase' which
1244 duplicates ntokens.
1245 * src/bison.simple: Formatting/comment changes.
1246 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1247 is an undocumented synonym.
1248
1fa14068
AD
12492001-12-22 Akim Demaille <akim@epita.fr>
1250
1251 * src/output.c (output_table_data): Change the prototype to use
1252 `int' for array ranges: some invocations do pass an int, not a
1253 short.
1254 Reported by Wayne Green.
1255
b9752825
AD
12562001-12-22 Akim Demaille <akim@epita.fr>
1257
1258 Some actions of web2c.y are improperly triggered.
1259 Reported by Mike Castle.
1260
1261 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1262 * tests/regression.at (Web2c): Rename as...
1263 (Web2c Report): this.
1264 (Web2c Actions): New.
1265
776209d6
AD
12662001-12-22 Akim Demaille <akim@epita.fr>
1267
1268 Reductions in web2c.y are improperly reported.
1269 Reported by Mike Castle.
1270
1271 * src/conflicts.c (print_reductions): Fix.
1272 * tests/regression.at (Web2c): New.
1273
275fc3ad
AD
12742001-12-18 Akim Demaille <akim@epita.fr>
1275
1276 Some host fail on `assert (!"foo")', which expands to
1277 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1278 Reported by Nelson Beebee.
1279
1280 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1281 `#define it_succeeded 0' and `assert (it_succeeded)'.
1282
897668ee
MA
12832001-12-17 Marc Autret <autret_m@epita.fr>
1284
1285 * src/bison.simple: Don't hard code the skeleton line and filename.
1286 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1287 New line counter 'skeleton_line' (skeleton-line muscle).
1288
ab3399e0
PE
12892001-12-17 Paul Eggert <eggert@twinsun.com>
1290
1291 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1292 YYDEBUG must be defined to a nonzero value.
1293
1294 * src/bison.simple (yytname): Do not assume that the user defines
1295 YYDEBUG to a properly parenthesized expression.
1296
3877f72b
AD
12972001-12-17 Akim Demaille <akim@epita.fr>
1298
1299 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1300 nlookaheads is a new member.
1301 Adjust all users.
1302 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1303 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1304 state.
776209d6 1305
331dbc1b
AD
13062001-12-17 Akim Demaille <akim@epita.fr>
1307
1308 * src/files.h, src/files.c (open_files, close_files): Remove.
1309 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1310 let...
1311 * src/reader.c (reader): Do it.
776209d6 1312
be750e4c
AD
13132001-12-17 Akim Demaille <akim@epita.fr>
1314
1315 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1316
709ae8c6
AD
13172001-12-17 Akim Demaille <akim@epita.fr>
1318
1319 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1320 (flush_reduce): New.
1321 (resolve_sr_conflict): Adjust.
776209d6 1322
f87685c3
AD
13232001-12-17 Akim Demaille <akim@epita.fr>
1324
1325 * src/output.c (output_obstack): Be static and rename as...
1326 (format_obstack): this, to avoid any confusion with files.c's
1327 output_obstack.
1328 * src/reader.h (muscle_obstack): Move to...
1329 * src/output.h: here, since it's defined in output.c.
1330
837491d8
AD
13312001-12-17 Akim Demaille <akim@epita.fr>
1332
1333 * src/output.c (action_row, save_column, default_goto)
1334 (sort_actions, matching_state, pack_vector): Better variable
1335 locality.
1336
796d61fb
AD
13372001-12-17 Akim Demaille <akim@epita.fr>
1338
1339 * src/output.c: Various formatting changes.
776209d6 1340
64d15509
AD
13412001-12-17 Akim Demaille <akim@epita.fr>
1342
1343 * src/files.c (output_files): Free the output_obstack.
1344 * src/main.c (main): Call print and print_graph conditionally.
1345 * src/print.c (print): Work unconditionally.
1346 * src/print_graph.c (print_graph): Work unconditionally.
1347 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1348
fbc8ecb7
MA
13492001-12-16 Marc Autret <autret_m@epita.fr>
1350
1351 * src/output.c (actions_output): Fix. When we use %no-lines,
1352 there is one less line per action.
1353
f0440388
MA
13542001-12-16 Marc Autret <autret_m@epita.fr>
1355
1356 * src/bison.simple: Remove a useless #line directive.
1357 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1358 * src/output.c (get_lines_number): New.
776209d6 1359 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1360 output muscles.
1361 Fix line numbering.
1362 (actions_output): Computes the number of lines taken by actions.
1363 (output_master_parser): Insert new skeleton which is the name of
1364 the output parser file name.
1365
a79986b8
MA
13662001-12-15 Marc Autret <autret_m@epita.fr>
1367
1368 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1369
4ec8e00f
MA
13702001-12-15 Marc Autret <autret_m@epita.fr>
1371
1372 * src/output.c (output_gram): Keep track of the hairy one.
1373
1a4648ff
AD
13742001-12-15 Akim Demaille <akim@epita.fr>
1375
1376 Make `make distcheck' work.
1377
1378 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1379 system.h which uses libgettext.h.
1380
9c2c67e6
AD
13812001-12-15 Akim Demaille <akim@epita.fr>
1382
1383 * src/nullable.c (set_nullable): Useless rules must be skipped,
1384 otherwise, since we range over their symbols, we might look at a
1385 nonterminal which no longer ``exists'', i.e., it is not counted in
1386 `nvars', hence we overflow our arrays.
1387
93ede233
AD
13882001-12-15 Akim Demaille <akim@epita.fr>
1389
1390 The header can also be produced directly, without any obstack!
1391 Yahoo!
1392
1393 * src/files.c, src/files.h (defines_obstack): Remove.
1394 (compute_header_macro): Global.
1395 (defines_obstack_save): Remove.
1396 * src/reader.c (parse_union_decl): No longer output to
1397 defines_obstack: its content can be found in the `stype' muscle
1398 anyway.
1399 (output_token_translations): Merge into...
1400 (symbols_output): this.
1401 Rename as...
1402 (symbols_save): this.
1403 (reader): Adjust.
1404 * src/output.c (header_output): New.
1405 (output): Call it.
1406
2666f928
AD
14072001-12-15 Akim Demaille <akim@epita.fr>
1408
1409 * src/reader.c (parse_union_decl): Instead of handling two obstack
1410 simultaneously, use one to define the `stype' muscle, and use the
1411 value of the latter to fill defines_obstack.
1412 (copy_comment): Remove.
1413 (copy_comment2): Work for a single obstack.
1414 Rename as...
1415 (copy_comment): this.
1416
428046f8
AD
14172001-12-15 Akim Demaille <akim@epita.fr>
1418
1419 * src/lex.c, src/lex.h (xgetc): No longer static.
1420 * src/reader.c (parse_union_decl): Revamp.
1421
ea52d706
AD
14222001-12-15 Akim Demaille <akim@epita.fr>
1423
1424 Still making progress in separating Bison into (i) input, (ii)
1425 process, (iii) output: now we can directly output the parser file
1426 without using table_obstack at all.
1427
1428 * src/files.c, src/files.h (table_obstack): Bye bye.
1429 (parser_file_name): New.
1430 * src/files.c (compute_output_file_names): Compute it.
1431 * src/output.c (actions_output, output_parser)
1432 (output_master_parser): To a file instead of an obstack.
1433
3f96f4dc
AD
14342001-12-15 Akim Demaille <akim@epita.fr>
1435
1436 Attach actions to rules, instead of pre-outputting them to
1437 actions_obstack.
1438
1439 * src/gram.h (rule_t): action and action_line are new members.
1440 * src/reader.c (symbol_list): Likewise.
1441 (copy_action): Save the actions within the rule.
1442 (packgram): Save them in rule_table.
1443 * src/output.c (actions_output): New.
1444 (output_parser): Use it on `%%actions'.
1445 (output_rule_data): Don't free rule_table.
1446 (output): Do it.
1447 (prepare): Don't save the `action' muscle.
1448 * src/bison.simple: s/%%action/%%actions/.
1449
51576fb3
AD
14502001-12-15 Akim Demaille <akim@epita.fr>
1451
1452 * src/reader.c (copy_action): When --yacc, don't append a `;'
1453 to the user action: let it fail if lacking.
dee049eb 1454 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1455
2648a72d
AD
14562001-12-14 Akim Demaille <akim@epita.fr>
1457
1458 * src/lex.c (literalchar): Simply return the char you decoded, non
1459 longer mess around with obstacks and int pointers.
1460 Adjust all callers.
1461
92790e5b
AD
14622001-12-14 Akim Demaille <akim@epita.fr>
1463
1464 * src/lex.c (literalchar): Don't escape the special characters,
1465 just decode them, and keep them as char (before, eol was output as
1466 the 2 char string `\n' etc.).
1467 * src/output.c (output_rule_data): Use quotearg to output the
1468 token strings.
1469
927c1557
PE
14702001-12-13 Paul Eggert <eggert@twinsun.com>
1471
1472 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1473 Do not infringe on the global user namespace when using C++.
1474 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1475 All uses of `fprintf' and `stderr' changed.
1476
1477 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1478
ed8e1f68
AD
14792001-12-13 Akim Demaille <akim@epita.fr>
1480
1481 The computation of nullable is broken: it doesn't handle empty
1482 RHS's properly.
1483
1484 * tests/torture.at (GNU AWK Grammar): New.
1485 * tests/sets.at (Nullable): New.
1486 * src/nullable.c (set_nullable): Instead of blindly looping over
1487 `ritems', loop over the rules, and then over their rhs's.
1488
1489 Work around Autotest bugs.
1490
1491 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1492 frame, because Autotest understand lines starting with a `+' as
1493 traces from the shell. Then, they are not processed properly.
1494 Admittedly an Autotest bug, but we don't have time to wait for
1495 Autotest to catch up.
1496 * tests/regression.at (Broken Closure): Adjust to the new table
1497 frames.
1498 Move to...
1499 * tests/sets.at: here.
1500
cb581495
AD
15012001-12-13 Akim Demaille <akim@epita.fr>
1502
1503 * src/closure.c (closure): Use nrules instead of playing tricks
1504 with BITS_PER_WORD.
1505
2e729273
AD
15062001-12-13 Akim Demaille <akim@epita.fr>
1507
1508 * src/print.c (print_actions): Output the handling of `$' as the
1509 traces do: shifting the token EOF. Before EOF was treated as a
1510 nonterminal.
1511 * tests/regression.at: Adjust some tests.
1512 * src/print_graph.c (print_core): Complete the set of items via
1513 closure. The next-to-final and final states are still unsatisfying,
1514 but that's to be addressed elsewhere.
1515 No longer output the rule numbers, but do output the state number.
1516 A single loop for the shifts + gotos is enough, but picked a
1517 distinct color for each.
1518 (print_graph): Initialize and finalize closure.
1519
107f7dfb
AD
15202001-12-13 Akim Demaille <akim@epita.fr>
1521
1522 * src/reader.c (readgram): Remove dead code, an strip useless
1523 braces.
1524 (get_type): Remove, unused.
1525
9b53a24f
AD
15262001-12-12 Akim Demaille <akim@epita.fr>
1527
1528 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1529 on that of lib/error.c.
1530
dbfb6dcd
AD
15312001-12-12 Akim Demaille <akim@epita.fr>
1532
1533 Some hosts don't like `/' in includes.
1534
1535 * src/system.h: Include libgettext.h without qualifying the path.
1536 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1537 $(top_srcdir).
1538
c25fb648
MA
15392001-12-11 Marc Autret <autret_m@epita.fr>
1540
1541 * src/output.c (output_parser): Remove useless muscle.
1542
710ddc4f
MA
15432001-12-11 Marc Autret <autret_m@epita.fr>
1544
1545 * src/bison.simple: Remove #line just before %%epilogue. It
1546 is now handled in ...
1547 * src/reader.c (read_additionnal_code): Add the output of a
1548 #line for the epilogue.
1549
e83d80b8
MA
15502001-12-10 Marc Autret <autret_m@epita.fr>
1551
927c1557 1552 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1553 replace precedent remove.
1554 * src/bison.simple: Remove #line before %%prologue because
1555 %%input-line is wrong at this time.
1556
971d5158
MA
15572001-12-10 Marc Autret <autret_m@epita.fr>
1558
1559 * src/reader.c (symbols_output): Clean up.
927c1557 1560 * src/output.c (output_gram, output): Clean up.
971d5158 1561
5edafffd
AD
15622001-12-10 Akim Demaille <akim@epita.fr>
1563
1564 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1565 * src/LR0.c (set_state_table): here.
1566 * src/lalr.c (lalr): Call it.
1567
0279f8e9
AD
15682001-12-10 Akim Demaille <akim@epita.fr>
1569
1570 * src/state.h (shifts): Remove the `number' member: shifts are
1571 attached to state, hence no longer need to be labelled with a
1572 state number.
1573
190c4f5f
AD
15742001-12-10 Akim Demaille <akim@epita.fr>
1575
1576 Now that states have a complete set of members, the linked list of
1577 shifts is useless: just fill directly the state's shifts member.
1578
1579 * src/state.h (shifts): Remove the `next' member.
1580 * src/LR0.c (first_state, last_state): Remove.
1581 Adjust the callers.
1582 (augment_automaton): Don't look for the shifts that must be added
1583 a shift on EOF: it is those of the state we looked for! But now,
1584 since shifts are attached, it is no longer needed to looking
1585 merely by its id: its number.
1586
2a73b93d
AD
15872001-12-10 Akim Demaille <akim@epita.fr>
1588
1589 * src/LR0.c (augment_automaton): Better variable locality.
1590 Remove an impossible branch: if there is a state corresponding to
1591 the start symbol being shifted, then there is shift for the start
1592 symbol from the initial state.
1593
74392f6a
AD
15942001-12-10 Akim Demaille <akim@epita.fr>
1595
1596 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1597 only when appropriate: when insert_start_shifting_state' is not
1598 invoked.
1599 * tests/regression.at (Rule Line Numbers): Adjust.
1600
37c82725
AD
16012001-12-10 Akim Demaille <akim@epita.fr>
1602
1603 * src/LR0.c (augment_automaton): Now that all states have shifts,
1604 merge the two cases addition shifts to the initial state.
1605
6a164e0c
AD
16062001-12-10 Akim Demaille <akim@epita.fr>
1607
1608 * src/lalr.c (set_state_table): Move to...
1609 * src/LR0.c: here.
1610 * src/lalr.c (lalr): Don't call it...
1611 * src/LR0.c (generate_states): do it.
1612 * src/LR0.h (first_state): Remove, only the table is used.
1613
7215de24
AD
16142001-12-10 Akim Demaille <akim@epita.fr>
1615
1616 * src/LR0.h (first_shift, first_reduction): Remove.
1617 * src/lalr.c: Don't use first_shift: find shifts through the
1618 states.
1619
80e25d4d
AD
16202001-12-10 Akim Demaille <akim@epita.fr>
1621
1622 * src/LR0.c: Attach shifts to states as soon as they are
1623 computed.
1624 * src/lalr.c (set_state_table): Instead of assigning shifts to
1625 state, just assert that the mapping was properly done.
1626
0ab3728b
AD
16272001-12-10 Akim Demaille <akim@epita.fr>
1628
1629 * src/LR0.c (insert_start_shift): Rename as...
1630 (insert_start_shifting_state): this.
1631 (insert_eof_shifting_state, insert_accepting_state): New.
1632 (augment_automaton): Adjust.
1633 Better locality of the variables.
1634 When looking if the start_symbol is shifted from the initial
1635 state, using `while (... symbol != start_symbol ...)' sounds
1636 better than `while (... symbol < start_symbol ...)': If fail
1637 to see how the order between symbols could be relevant!
1638
78af9bbc
AD
16392001-12-10 Akim Demaille <akim@epita.fr>
1640
1641 * src/getargs.h: Don't declare `spec_name_prefix' and
1642 `spec_file_prefix', declared by src/files.h.
1643 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1644 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1645 * src/output.c (prepare): Adjust.
1646 * src/reader.c (symbols_output): Likewise.
1647 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1648
bdef2a41
AD
16492001-12-10 Akim Demaille <akim@epita.fr>
1650
1651 * src/muscle_tab.c (muscle_init): NULL is a better default than
1652 `"0"'.
1653
3735969c
AD
16542001-12-10 Akim Demaille <akim@epita.fr>
1655
1656 * src/reader.c (reader): Calling symbols_output once is enough.
1657
49701457
AD
16582001-12-10 Akim Demaille <akim@epita.fr>
1659
1660 Now that states have a complete set of members, the linked list of
1661 reductions is useless: just fill directly the state's reductions
1662 member.
1663
1664 * src/state.h (struct reductions): Remove member `number' and
1665 `next'.
1666 * src/LR0.c (first_reduction, last_reduction): Remove.
1667 (save_reductions): Don't link the new reductions, store them in
1668 this_state.
1669 * src/lalr.c (set_state_table): No need to attach reductions to
1670 states, it's already done.
1671 * src/output.c (output_actions): No longer free the shifts, then
1672 the reductions, then the states: free all the states and their
1673 members.
1674
0edad749
AD
16752001-12-10 Akim Demaille <akim@epita.fr>
1676
1677 * src/options.c (OPTN, DRTV, BOTH): New.
1678 (option_table): Use them.
1679
0edad749
AD
1680 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1681 the job of system.h.
1682 * src/options.c: Don't include stdio.h and xalloc.h for the same
1683 reasons.
1684
5449dd0f
AD
16852001-12-10 Akim Demaille <akim@epita.fr>
1686
1687 * src/output.c (output, prepare): Make sure the values of the
1688 muscles `action' and `prologue' are 0-terminated.
1689
a870c567
AD
16902001-12-10 Akim Demaille <akim@epita.fr>
1691
1692 Clean up GCC warnings.
1693
1694 * src/reader.c (copy_action): `buf' is not used.
1695 (parse_skel_decl): Be static.
1696 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1697 * src/options.h (create_long_option_table): Have a real prototype.
1698 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1699 (hash_delete_at): Return const void *.
1700 Adjust casts to preserve the const.
1701
80df8768
AD
17022001-12-10 Akim Demaille <akim@epita.fr>
1703
1704 * configure.in: Require 2.52g.
1705 M4 is not needed, but AUTOM4TE is.
1706 * m4/m4.m4: Remove.
1707 * tests/Makefile.am: Adjust.
1708
f693ad14
AD
17092001-12-10 Akim Demaille <akim@epita.fr>
1710
1711 One structure for states is enough, even though theoretically
1712 there are LR(0) states and LALR(1) states.
1713
1714 * src/lalr.h (state_t): Remove.
1715 (state_table): Be state_t **, not state_t *.
1716 * src/state.h (core, CORE_ALLOC): Rename as...
1717 (state_t, STATE_ALLOC): this.
1718 Add the LALR(1) members: shifts, reductions, errs.
1719 * src/LR0.c (state_table): Rename as...
1720 (state_hash): this, to avoid name clashes with the global
1721 `state_table'.
1722 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1723 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1724
74ffbcb6
AD
17252001-12-10 Akim Demaille <akim@epita.fr>
1726
1727 Bison dumps core on bash.y.
1728 Reported by Pascal Bart.
1729
1730 * src/warshall.c (bitmatrix_print): New.
1731 (TC): Use it.
1732 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1733 j must be the outer loop.
1734 * tests/regression.at (Broken Closure): New.
1735
07708e19
AD
17362001-12-05 Akim Demaille <akim@epita.fr>
1737
1738 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1739 its argument.
1740