]> git.saurik.com Git - bison.git/blame - ChangeLog
Remove Id line.
[bison.git] / ChangeLog
CommitLineData
fff9bf0b
RA
12002-03-04 Robert Anisko <robert@lrde.epita.fr>
2
3 * src/reader.c: Warn about lacking semi-colons, do not complain.
4
64dba31e
RA
52002-03-04 Robert Anisko <robert@lrde.epita.fr>
6
7 * data/bison.c++: Remove a debug line.
8
374f5a14
RA
92002-03-04 Robert Anisko <robert@lrde.epita.fr>
10
11 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
13 provide a default implementation.
14
bfcf1f3a
AD
152002-03-04 Akim Demaille <akim@epita.fr>
16
17 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20 * tests/semantic.at (Parsing Guards): Similarly.
21 * src/reader.at (readgram): Complain if the last rule is not ended
22 with a semi-colon.
23
65ccf9fc
AD
242002-03-04 Akim Demaille <akim@epita.fr>
25
26 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
27 * src/closure.c: here.
28 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
29 RTC.
30 * src/warshall.h, src/warshall.c: Remove.
31 * tests/sets.at (Broken Closure): Adjust.
32
d0039cbc
AD
332002-03-04 Akim Demaille <akim@epita.fr>
34
35 * src/output.c (output_skeleton): tempdir is const.
36 bytes_read is unused.
37
345cea78
AD
382002-03-04 Akim Demaille <akim@epita.fr>
39
40 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
41 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
42 Update.
43 From Michael Hayes.
44
564801f7
AD
452002-03-04 Akim Demaille <akim@epita.fr>
46
47 * src/closure.c (closure): `r' is unused.
48
e5352bc7
AD
492002-03-04 Akim Demaille <akim@epita.fr>
50
51 * tests/sets.at (Broken Closure): Add the ending `;'.
52 * src/reader.at (readgram): Complain if a rule is not ended with a
53 semi-colon.
54
914feea9
AD
552002-03-04 Akim Demaille <akim@epita.fr>
56
57 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
58 (count_sr_conflicts): Use bitset_count.
59 * src/reduce.c (inaccessable_symbols): Ditto.
60 (bits_size): Remove.
61 * src/warshall.h, src/warshall.c: Convert to bitsetv.
62
f0250de6
AD
632002-03-04 Akim Demaille <akim@epita.fr>
64
65 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
66 * src/reduce.c: Remove the `bitset_zero's following the
67 `bitset_create's, as now it is performed by the latter.
68
ef017502
AD
692002-03-04 Akim Demaille <akim@epita.fr>
70
71 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
72 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
73 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
74 latest sources from Michael.
75
76514394
AD
762002-03-04 Akim Demaille <akim@epita.fr>
77
78 * src/output.c (output): Don't free the grammar.
79 * src/reader.c (grammar_free): New.
80 * src/main.c (main): Call it and don't free symtab here.
81
55024580
AD
822002-03-04 Akim Demaille <akim@epita.fr>
83
84 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
85 before returning.
86 Reported by Benoit Perrot.
87
f9abaa2c
AD
882002-03-04 Akim Demaille <akim@epita.fr>
89
90 Use bitset operations when possible, not loops over bits.
91
92 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
93 bitset_or.
94 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
95 * src/reduce.c (useless_nonterminals): Formatting changes.
96 * src/warshall.c (TC): Use bitset_or.
97
0e721e75
AD
982002-03-04 Akim Demaille <akim@epita.fr>
99
100 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
101 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
102 Ditto.
103
0fb1ffb1
AD
1042002-03-04 Akim Demaille <akim@epita.fr>
105
106 * src/lalr.c (F): Now a bitset*.
107 Adjust all dependencies.
108
b86796bf
AD
1092002-03-04 Akim Demaille <akim@epita.fr>
110
111 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
112 Adjust all dependencies.
113
602bbf31
AD
1142002-03-04 Akim Demaille <akim@epita.fr>
115
116 * src/L0.c, src/LR0.h (nstates): Be size_t.
117 Adjust comparisons (signed vs unsigned).
118 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
119 bitset*.
120 Adjust all dependencies.
121
d8a0245c
AD
1222002-03-04 Akim Demaille <akim@epita.fr>
123
124 * src/closure.c (firsts): Now, also a bitset.
125 Adjust all dependencies.
126 (varsetsize): Remove, now unused.
127 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
128
34ba9743
AD
1292002-03-04 Akim Demaille <akim@epita.fr>
130
131 * src/print.c: Convert to use bitset.h, not hand coded iterations
132 over ints.
133
ed86e78c
AD
1342002-03-04 Akim Demaille <akim@epita.fr>
135
136 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
137
dfdb1797
AD
1382002-03-04 Akim Demaille <akim@epita.fr>
139
140 * src/closure.c (ruleset): Be a bitset.
141 (rulesetsize): Remove.
142
7086e707
AD
1432002-03-04 Akim Demaille <akim@epita.fr>
144
145 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
146 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
147 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
148 * src/closure.c (fderives): Be an array of bitsets.
149
98254360
RA
1502002-02-28 Robert Anisko <robert@lrde.epita.fr>
151
152 * data/bison.c++: Merge the two generated headers. Insert a copyright
153 notice in each output file.
154
a75c057f
AD
1552002-02-28 Akim Demaille <akim@epita.fr>
156
157 * data/bison.c++: Copy the prologue of bison.simple to fetch
158 useful M4 definitions, such as b4_header_guard.
159
06b00abc
AD
1602002-02-25 Akim Demaille <akim@epita.fr>
161
162 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
163 translator friendly scheme for the bgr
164 copyright notice.
06b00abc 165
70e7d534
AD
1662002-02-25 Akim Demaille <akim@epita.fr>
167
168 * src/output.c (header_output): Remove, now handled completely via
169 M4.
170
abe017f6
AD
1712002-02-25 Akim Demaille <akim@epita.fr>
172
173 * m4/m4.m4: New, from CVS Autoconf.
174 * configure.in: Invoke it.
175 * src/output.c (output_skeleton): Use its result instead of the
176 hard coded name.
177
381fb12e
AD
1782002-02-25 Akim Demaille <akim@epita.fr>
179
180 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
181 Fileutils 4.1.5.
182 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
183 * src/output.c (output_skeleton): Use mkstemp to create a real
184 temporary file.
185 Move the filling of `skeleton' and its muscle to...
186 (prepare): here.
187 (output): Move the definition of the prologue muscle to...
188 (prepare): here.
189 * src/system.h (DEFAULT_TMPDIR): New.
190
6f38107f
PE
1912002-02-14 Paul Eggert <eggert@twinsun.com>
192
193 Remove the support for C++ namespace cleanliness; it was
194 causing more problems than it was curing, since it didn't work
195 properly on some nonstandard C++ compilers. This can wait
196 for a proper C++ parser.
197
198 * NEWS: Document this.
199 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
200 of C++, as it's treated like C now.
201 * src/bison.simple (YYSTD): Remove.
202 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
203 Treat C++ just like Standard C instead of trying to support
204 namespace cleanliness.
205
80cce3da
AD
2062002-02-14 Akim Demaille <akim@epita.fr>
207
208 * tests/regression.at (else): Adjust to Andreas' change.
209
842e8679
AD
2102002-02-14 Akim Demaille <akim@epita.fr>
211
212 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
213
4bda3f10
AD
2142002-02-13 Andreas Schwab <schwab@suse.de>
215
216 * src/output.c (output_rule_data): Don't output NULL, it might
217 not be defined yet.
218
4162fa07 2192002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 220
4162fa07
RA
221 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
222 (Copyright notice): Update.
b418ecd8 223
bd16a5dc
AD
2242002-02-11 Akim Demaille <akim@epita.fr>
225
226 * tests/regression.at (%nonassoc and eof): Don't include
227 nonportable headers.
228
8d69a1a3
RA
2292002-02-08 Robert Anisko <robert@lrde.epita.fr>
230
231 * data/bison.c++: Correct error recovery. Make the user able to
232 initialize the starting location.
233
9b2d0677
AD
2342002-02-07 Akim Demaille <akim@epita.fr>
235
236 * tests/input.at: New.
237
69e2658b
RA
2382002-02-07 Robert Anisko <robert@lrde.epita.fr>
239
240 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 241 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
242 directives around tables only needed for debugging.
243
4aacc3a7
RA
2442002-02-07 Robert Anisko <robert@lrde.epita.fr>
245
246 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
247 C++ parsers.
248 (yy::b4_name::parse): Use print_.
249
762a801e
RA
2502002-02-07 Robert Anisko <robert@lrde.epita.fr>
251
252 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
253
4bb2bc3f
RA
2542002-02-07 Robert Anisko <robert@lrde.epita.fr>
255
256 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
257 C++ parsers.
258 (yy::b4_name::parse): Build verbose error messages, and use error_.
259
6b45a3ca
RA
2602002-02-06 Robert Anisko <robert@lrde.epita.fr>
261
262 * data/bison.c++: Fix m4 quoting in comments.
263
50997c6e
RA
2642002-02-06 Robert Anisko <robert@lrde.epita.fr>
265
266 * data/bison.c++: Adjust the parser code. Fix some muscles that were
267 not expanded by m4.
268
3f3eed27
AD
2692002-02-05 Akim Demaille <akim@epita.fr>
270
271 * data/bison.c++: Adjust to the M4 back end.
272 More is certainly needed.
273
be2a1a68
AD
2742002-02-05 Akim Demaille <akim@epita.fr>
275
276 Give a try to M4 as a back end.
277
278 * lib/readpipe.c: New, from wdiff.
279 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
280 BISON_HAIRY.
281 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
282 specific values. Now it is m4 that performs the lookup.
283 * src/parse-skel.y: Remove.
284 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
285 * src/output.c (actions_output, guards_output)
286 (token_definitions_output): No longer keeps track of the output
287 line number, hence remove the second argument.
288 (guards_output): Check against the guard member of a rule, not the
289 action member.
290 Adjust callers.
291 (output_skeleton): Don't look for the skeleton location, let m4 do
292 that.
293 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
294 file will be used.
295 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
296 (prepare): Given that for the time being changesyntax is not
297 usable in M4, rename the muscles using `-' to `_'.
298 Define `defines_flag', `output_parser_name' and `output_header_name'.
299 * src/output.h (actions_output, guards_output)
300 (token_definitions_output): Adjust prototypes.
301 * src/scan-skel.l: Instead of scanning the skeletons, it now
302 processes the output of m4: `__oline__' and `#output'.
303 * data/bison.simple: Adjust to be used by M4(sugar).
304 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
305 to date.
306 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
307 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
308 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
309 shamelessly stolen from CVS Autoconf.
310
beda758b
AD
3112002-02-05 Akim Demaille <akim@epita.fr>
312
313 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
314 * configure.in: Check for the declarations of free and malloc.
315 * src/muscle_tab.c: Adjust.
316
5ece6d43
AD
3172002-02-05 Akim Demaille <akim@epita.fr>
318
319 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
320 which have no values.
321
5bb18f9a
AD
3222002-02-05 Akim Demaille <akim@epita.fr>
323
324 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
325 * data/: here.
326
894dd62e
PE
3272002-01-29 Paul Eggert <eggert@twinsun.com>
328
329 * src/bison.simple (YYSIZE_T): Do not define merely because
330 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
331 On some platforms, <alloca.h> does not declare YYSTD (size_t).
332
82841af7
AD
3332002-01-27 Akim Demaille <akim@epita.fr>
334
335 Fix `%nonassoc and eof'.
336
337 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
338 which were not properly copied! Replace
339 memcpy (res->errs, src->errs, src->nerrs);
340 with
341 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
342 !!!
343 * tests/regression.at (%nonassoc and eof): Adjust to newest
344 Autotest: `.' is not in the PATH.
345
318b76e9
AD
3462002-01-27 Akim Demaille <akim@epita.fr>
347
348 * tests/sets.at (AT_EXTRACT_SETS): New.
349 (Nullable): Use it.
350 (Firsts): New.
351
30d2f3d5
AD
3522002-01-26 Akim Demaille <akim@epita.fr>
353
354 * tests/actions.at, tests/calc.at, tests/headers.at,
355 * tests/torture.at: Adjust to the newest Autotest which no longer
356 forces `.' in the PATH.
357
30f8c395
AD
3582002-01-25 Akim Demaille <akim@epita.fr>
359
360 * tests/regression.at (%nonassoc and eof): New.
361 Suggested by Robert Anisko.
362
29ae55f1
AD
3632002-01-24 Akim Demaille <akim@epita.fr>
364
365 Bison dumps core when trying to complain about broken input files.
366 Reported by Cris van Pelt.
367
368 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
369 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
370 into...
371 (Invalid inputs): Strengthen: exercise parse_percent_token.
372
2b548aa6
RA
3732002-01-24 Robert Anisko <robert.anisko@epita.fr>
374
375 * src/Makefile.am: Add bison.c++.
376 * src/bison.c++: New skeleton.
377
bb0146c2
AD
3782002-01-21 Paolo Bonzini <bonzini@gnu.org>
379
380 * po/it.po: New.
381
bec30531
AD
3822002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
383
384 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
385
fc6edc45
MA
3862002-01-20 Marc Autret <marc@gnu.org>
387
388 * src/files.c (compute_output_file_names): Fix
389
5e5d5415
MA
3902002-01-20 Marc Autret <marc@gnu.org>
391
392 * tests/output.at: New test.
393 * src/files.c (compute_base_names): Don't map extensions when
394 the YACC flag is set, use defaults.
395 Reported by Evgeny Stambulchik.
396
44ea3fbd
MA
3972002-01-20 Marc Autret <marc@gnu.org>
398
bb0146c2 399 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
400 compilers as well (i.e. the vendor C compiler).
401 Suggested by Albert Chin-A-Young.
402
338963d1
TVH
4032002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
404
405 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
406 canonical definition.
407 * src/system.h: Use the canonical definition for PARAMS (avoids
408 a conflict with the macro from lib/hash.h).
409
c57b2479
AD
4102002-01-11 Akim Demaille <akim@epita.fr>
411
412 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 413 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 414
b85810ae
AD
4152002-01-09 Akim Demaille <akim@epita.fr>
416
417 * src/files.c, src/files.h (output_infix): New.
418 (tab_extension): Remove.
419 (compute_base_names): Compute the former, drop the latter.
420 * src/output.c (prepare): Insert the muscles `output-infix', and
421 `output-suffix'.
422 * src/parse-skel.y (string, string.1): New.
423 (section.header): Use it.
424 (section.yacc): Remove.
425 (prefix): Remove too.
426 * src/scan-skel.l: Adjust.
427 * src/bison.simple, src/bison.hairy: Adjust.
428
cae60122
AD
4292002-01-09 Akim Demaille <akim@epita.fr>
430
431 * configure.in (WERROR_CFLAGS): Compute it.
432 * src/Makefile.am (CFLAGS): Pass it.
433 * tests/atlocal.in (CFLAGS): Idem.
434 * src/files.c: Fix a few warnings.
435 (get_extension_index): Remove, unused.
436
ae404801
AD
4372002-01-08 Akim Demaille <akim@epita.fr>
438
439 * src/getargs.c (AS_FILE_NAME): New.
440 (getargs): Use it to convert DOSish file names.
441 * src/files.c (base_name): Rename as full_base_name to avoid
442 clashes with `base_name ()'.
443 (filename_split): New.
444 (compute_base_names): N-th rewrite, using filename_split.
445
22312b71
AD
4462002-01-08 Akim Demaille <akim@epita.fr>
447
448 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
449 New, stolen from the Fileutils 4.1.
450 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
451 * configure.in: Check for the presence of memrchr, and of its
452 prototype.
453
a67cef01
TVH
4542002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
455
456 * lib/hash.h (__P): Added definition for this macro.
457 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
458 BUILT_SOURCES, to ensure they are generated first.
459 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
460 %error-verbose to allow bootstrapping with bison 1.30x.
461
2b25d624
AD
4622002-01-06 Akim Demaille <akim@epita.fr>
463
464 * src/reader.c (parse_braces): Don't fetch the next char, the
465 convention is to fetch on entry.
466 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
467 'switch' without a following semicolon.
468 * tests/regression.at (braces parsing): New.
469
3460813b
AD
4702002-01-06 Akim Demaille <akim@epita.fr>
471
472 Bison is dead wrong in its RR conflict reports.
473
474 * tests/torture.at (GNU Cim Grammar): New.
475 * src/conflicts.c (count_rr_conflicts): Fix.
476
73784c64
AD
4772002-01-06 Akim Demaille <akim@epita.fr>
478
479 Creating package.m4 from configure.ac causes too many problems.
480
481 * tests/Makefile.am (package.m4): Create it by hand,
482 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
483
25d81090
AD
4842002-01-06 Akim Demaille <akim@epita.fr>
485
486 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
487 skeleton.h.
488
a9b8959e
PE
4892002-01-04 Paul Eggert <eggert@twinsun.com>
490
491 * doc/bison.texinfo (Debugging):
492 Remove YYSTDERR; it's no longer defined or used.
493 Also, s/cstdio.h/cstdio/.
494
25d81090
AD
4952002-01-03 Akim Demaille <akim@epita.fr>
496
497 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
498
1109455c
AD
4992002-01-03 Akim Demaille <akim@epita.fr>
500
501 * src/parse-skel.y (process_skeleton): Don't bind the parser's
502 tracing code to --trace, wait for a better --trace option, with
503 args.
504
7ea5e977
AD
5052002-01-03 Akim Demaille <akim@epita.fr>
506
507 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
508 The ISO C++ standard is extremely clear about it: stderr is
509 considered a macro, not a regular symbol (see table 94 `Header
510 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
511 Therefore std:: does not apply to it. It still does with fprintf.
512 Also, s/cstdio.h/cstdio/.
513
fab5b110
AD
5142002-01-03 Akim Demaille <akim@epita.fr>
515
516 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
517 for non system headers.
518
aed7fd9b
AD
5192002-01-02 Akim Demaille <akim@epita.fr>
520
521 Equip the skeleton chain with location tracking, runtime trace,
522 pure parser and scanner.
523
524 * src/parse-skel.y: Request a pure parser, locations, and prefix
525 renaming.
526 (%union): Having several members with the same type does not help
527 type mismatches, simplify.
528 (YYPRINT, yyprint): New.
529 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
530 (skel_error): this.
531 Handle locations.
532 * src/scan-skel.l: Adjust to these changes.
533 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
534 (LOCATION_PRINT, skel_control_t): New.
535
24fad99e
AD
5362001-12-30 Akim Demaille <akim@epita.fr>
537
538 * src/parse-skel.y: Get rid of the shift/reduce conflict:
539 replace `gb' with BLANKS.
540 * src/scan-skel.l: Adjust.
541
a4b36db4
AD
5422001-12-30 Akim Demaille <akim@epita.fr>
543
544 * src/system.h: We don't need nor want bcopy.
545 Throw away MS-DOS crap: we don't need getpid.
546 * configure.in: We don't need strndup. It was even causing
547 problems: because Flex includes the headers *before* us,
548 _GNU_SOURCE is not defined by config.h, and therefore strndup was
549 not visible.
550 * lib/xstrndup.c: New.
551 * src/scan-skel.l: Use it.
552 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
553 * src/parse-skel.y: Use %directives instead of #defines.
554
1239777d
AD
5552001-12-30 Akim Demaille <akim@epita.fr>
556
557 * src/skeleton.h: New.
558 * src/output.c (output_parser, output_master_parser): Remove, dead
559 code.
560 * src/output.h (get_lines_number, actions_output, guards_output)
561 (token_definitions_output): Prototype them.
562 * src/parse-skel.y: Add the license notice.
563 Include output.h and skeleton.h.
564 (process_skeleton): Returns void, and takes a single parameter.
565 * src/scan-skel.l: Add the license notice.
566 Include skeleton.h.
567 Don't use %option yylineno: it seems that then Flex imagines
568 REJECT has been used, and therefore it won't reallocate its
569 buffers (which makes no other sense to me than a bug). It results
570 in warnings for `unused: yy_flex_realloc'.
571
9b3add5b
RA
5722001-12-30 Robert Anisko <robert.anisko@epita.fr>
573
574 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
575 (MUSCLE_INSERT_PREFIX): ...to there.
576 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
577 (MUSCLE_INSERT_PREFIX): Move from here...
578
579 * src/bison.hairy: Add a section directive. Put braces around muscle
580 names. This parser skeleton is still broken, but Bison should not
581 choke on a bad muscle 'syntax'.
582 * src/bison.simple: Add a section directive. Put braces around muscle
583 names.
584
585 * src/files.h (strsuffix, stringappend): Add declarations.
586 (tab_extension): Add declaration.
587 (short_base_name): Add declaration.
588
589 * src/files.c (strsuffix, stringappend): No longer static. These
590 functions are used in the skeleton parser.
591 (tab_extension): New.
592 (compute_base_names): Use the computations done in this function
fab5b110 593 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
594 names.
595 (short_base_name): No longer static.
596
597 * src/output.c (output_skeleton): New.
598 (output): Disable call to output_master_parser, and give a try to
599 a new skeleton handling system.
600 (guards_output, actions_output): No longer static.
601 (token_definitions_output, get_lines_number): No longer static.
602
603 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
604
fab5b110 605 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
606 parse-skel.y.
607
608 * src/parse-skel.y: New file.
609 * src/scan-skel.l: New file.
610
b5b61c61
AD
6112001-12-29 Akim Demaille <akim@epita.fr>
612
613 %name-prefix is broken.
614
615 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
616 Adjust all dependencies.
617 * tests/headers.at (export YYLTYPE): Strengthen this test: use
618 %name-prefix.
619
620 Renaming yylval but not yylloc is not consistent. Now we do.
621
622 * src/bison.simple: Prefix yylloc if used.
623 * doc/bison.texinfo (Decl Summary): Document that.
624
8c9a50be
AD
6252001-12-29 Akim Demaille <akim@epita.fr>
626
627 * doc/bison.texinfo: Promote `%long-directive' over
628 `%long_directive'.
629 Remove all references to fixed-output-files, yacc is enough.
630
d99361e6
AD
6312001-12-29 Akim Demaille <akim@epita.fr>
632
633 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
634 user prologue. These are defaults.
635 * tests/actions.at (Mid-rule actions): Make sure the user can
636 define YYDEBUG and YYERROR_VERBOSE.
637
b9cecb91
AD
6382001-12-29 Akim Demaille <akim@epita.fr>
639
640 * src/output.c (header_output): Don't forget to export YYLTYPE and
641 yylloc.
642 * tests/headers.at (export YYLTYPE): New, make sure it does.
643 * tests/regression.at (%union and --defines, Invalid CPP headers):
644 Move to...
645 * tests/headers.at: here.
646
aea13e97
AD
6472001-12-29 Akim Demaille <akim@epita.fr>
648
649 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
650
931394cb
AD
6512001-12-29 Akim Demaille <akim@epita.fr>
652
653 * tests/actions.at (Mid-rule actions): Output on a single line
654 instead of several.
655
704a47c4
AD
6562001-12-29 Akim Demaille <akim@epita.fr>
657
658 * doc/bison.texinfo: Formatting changes.
659
091e20bb
AD
6602001-12-29 Akim Demaille <akim@epita.fr>
661
662 Don't store the token defs in a muscle, just be ready to output it
663 on command. Now possible via `symbols'. Fixes a memory leak.
664
665 * src/output.c (token_definitions_output): New.
666 (output_parser, header_output): Use it.
667 * src/reader.c (symbols_save): Remove.
668
cce71710
AD
6692001-12-29 Akim Demaille <akim@epita.fr>
670
671 * src/bison.simple: Do not provide a default for YYSTYPE and
672 YYLTYPE before the user's prologue. Otherwise it's hardly... a
673 default.
674
82c035a8
AD
6752001-12-29 Akim Demaille <akim@epita.fr>
676
677 Mid-rule actions are simply... ignored!
678
679 * src/reader.c (readgram): Be sure to attach mid-rule actions to
680 the empty-rule associated to the dummy symbol, not to the host
681 rule.
682 * tests/actions.at (Mid-rule actions): New.
683
8419d367
AD
6842001-12-29 Akim Demaille <akim@epita.fr>
685
686 Memory leak.
687
688 * src/reader.c (reader): Free grammar.
689
375d5806
AD
6902001-12-29 Akim Demaille <akim@epita.fr>
691
692 Memory leak.
693
694 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
695 since it allocates it for each state, although only one is needed.
696 (allocate_storage): Do it here.
697
f51cb8ff
AD
6982001-12-29 Akim Demaille <akim@epita.fr>
699
700 * src/options.h, src/options.c (create_long_option_table): Rename
701 as...
702 (long_option_table_new): this, with a clearer prototype.
703 (percent_table): Remove, unused,
704 * src/getargs.c (getargs): Adjust.
705
29e88316
AD
7062001-12-29 Akim Demaille <akim@epita.fr>
707
708 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
709 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
710 as states.
711
b9f71f19
AD
7122001-12-29 Akim Demaille <akim@epita.fr>
713
714 * src/lalr.c (build_relations): Rename `states' as `states1'.
715 Sorry, I don't understand exactly what it is, no better name...
716
1a2b5d37
AD
7172001-12-29 Akim Demaille <akim@epita.fr>
718
719 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
720 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
721 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
722 as rules.
723
1cca533e
AD
7242001-12-29 Akim Demaille <akim@epita.fr>
725
726 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
727 ago.
728
c03ae966
AD
7292001-12-29 Akim Demaille <akim@epita.fr>
730
731 * src/reader.c, src/reader.h (user_toknums): Remove.
732 Adjust all users to use symbols[i]->user_token_number.
733
5a670b1e
AD
7342001-12-29 Akim Demaille <akim@epita.fr>
735
736 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
737 Adjust all users to use symbols[i]->prec or ->assoc.
738
ad949da9
AD
7392001-12-29 Akim Demaille <akim@epita.fr>
740
741 * src/reader.c, src/reader.h (tags): Remove.
742 Adjust all users to use symbols[i]->tag.
743
0e78e603
AD
7442001-12-29 Akim Demaille <akim@epita.fr>
745
746 * src/gram.h, src/gram.c (symbols): New, similar to state_table
747 and rule_table.
748 * src/reader.c (packsymbols): Fill this table.
749 Drop sprec.
750 * src/conflicts.c (resolve_sr_conflict): Adjust.
751 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
752 single table.
753 Use symbols[i]->tag instead of tags[i].
754
213e640e
AD
7552001-12-29 Akim Demaille <akim@epita.fr>
756
757 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
758 In addition, put a comment in there, to replace...
759 * tests/regression.at (%union and C comments): Remove.
760
e7b8bef1
AD
7612001-12-29 Akim Demaille <akim@epita.fr>
762
763 * tests/regression.at (Web2c Actions): Blindly move the actual
764 output as expected output. The contents *seem* right to me, but I
765 can't pretend reading perfectly parser tables... Nonetheless, all
766 the other tests pass correctly, the table look OK, even though the
767 presence of `$axiom' is to be noted: AFAICS it is useless (but
768 harmless).
769
b68e7744
AD
7702001-12-29 Akim Demaille <akim@epita.fr>
771
772 * src/reader.c (readgram): Don't add the rule 0 if there were no
773 rules read. In other words, add it _after_ having performed
774 grammar sanity checks.
775 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
776
78d5bae9
AD
7772001-12-29 Akim Demaille <akim@epita.fr>
778
779 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
780 visible, and some states have now a different number.
781
ff442794
AD
7822001-12-29 Akim Demaille <akim@epita.fr>
783
784 * src/reader.c (readgram): Bind the initial rule's lineno to that
785 of the first rule.
786 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
787 (Solved SR Conflicts): Adjust rule 0's line number.
788
610ab194
AD
7892001-12-29 Akim Demaille <akim@epita.fr>
790
791 Fix the `GAWK Grammar' failure.
792
793 * src/LR0.c (final_state): Initialize to -1 so that we do compute
794 the reductions of the first state which was mistakenly confused
795 with the final state because precisely final_state was initialized
796 to 0.
797 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
798 now noticed by Bison.
799 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
800 have a reduction on $default.
801
29d29c8f
AD
8022001-12-29 Akim Demaille <akim@epita.fr>
803
804 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
805 rule line numbers.
806 * src/closure.c (print_closure): Likewise.
807 * src/derives.c (print_derives): Likewise.
808 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
809 now.
810
7c6b64d0
AD
8112001-12-29 Akim Demaille <akim@epita.fr>
812
813 * src/lalr.c (lookaheads_print): New.
814 (lalr): Call it when --trace-flag.
815 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
816 are dumped.
817
3d4daee3
AD
8182001-12-29 Akim Demaille <akim@epita.fr>
819
820 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
821 when walking through ritem, even via rule->rhs.
822 * src/reduce.c (dump_grammar, useful_production, reduce_output)
823 (useful_production, useless_nonterminals): Likewise.
824 (reduce_grammar_tables): Likewise, plus update nritems.
825 * src/nullable.c (set_nullable): Likewise.
826 * src/lalr.c (build_relations): Likewise.
827 * tests/sets.at (Nullable): Adjust.
828 Fortunately, now, the $axiom is no longer nullable.
829
9e7f6bbd
AD
8302001-12-29 Akim Demaille <akim@epita.fr>
831
832 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
833 the 0-sentinel.
834 * src/gram.c (ritem_longest_rhs): Likewise.
835 * src/reduce.c (nonterminals_reduce): Likewise.
836 * src/print_graph.c (print_graph): Likewise.
837 * src/output.c (output_rule_data): Likewise.
838 * src/nullable.c (set_nullable): Likewise.
839
255ef638
AD
8402001-12-29 Akim Demaille <akim@epita.fr>
841
842 * src/output.c: Comment changes.
843
0d8a7363
AD
8442001-12-27 Paul Eggert <eggert@twinsun.com>
845
846 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
847 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
848 Sparc, as they were causing more porting problems than the
849 (minor) performance improvement was worth.
850
851 Also, catch up with 1.31's YYSTD.
852
3db472b9
AD
8532001-12-27 Akim Demaille <akim@epita.fr>
854
855 * src/output.c (output_gram): Rely on nritems, not the
856 0-sentinel. See below.
857 Use -1 as separator, not 0.
858 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
859 Rely on -1 as separator in yyrhs, instead of 0.
860 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
861 twice `Now at end of input', therefore there are two lines less to
862 expect.
863
b365aa05
AD
8642001-12-27 Akim Demaille <akim@epita.fr>
865
866 * tests/regression.at (Unresolved SR Conflicts):
867 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
868 below.
869
30171f79
AD
8702001-12-27 Akim Demaille <akim@epita.fr>
871
872 * src/LR0.c (new_state): Recognize the final state by the fact it
873 is reached by eoftoken.
874 (insert_start_shifting_state, insert_eof_shifting_state)
875 (insert_accepting_state, augment_automaton): Remove, since now
876 these states are automatically computed from the initial state.
877 (generate_states): Adjust.
878 * src/print.c: When reporting a rule number to the user, substract
879 1, so that the axiom rule is rule 0, and the first user rule is 1.
880 * src/reduce.c: Likewise.
881 * src/print_graph.c (print_core): For the time being, just as for
882 the report, depend upon --trace-flags to dump the full set of
883 items.
884 * src/reader.c (readgram): Once the grammar read, insert the rule
885 0: `$axiom: START-SYMBOL $'.
886 * tests/set.at: Adjust: rule 0 is now displayed, and since the
887 number of the states has changed (the final state is no longer
888 necessarily the last), catch up.
889
75142d45
AD
8902001-12-27 Akim Demaille <akim@epita.fr>
891
892 Try to make the use of the eoftoken valid. Given that its value
893 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
894 is used instead of > 0 where appropriate, (ii), depend upon nritems
895 instead of the 0-sentinel.
896
897 * src/gram.h, src/gram.c (nritems): New.
898 Expected to be duplication of nitems, but for the time being...
899 * src/reader.c (packgram): Assert nritems and nitems are equal.
900 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
901 * src/closure.c (print_closure, print_fderives): Likewise.
902 * src/gram.c (ritem_print): Likewise.
903 * src/print.c (print_core, print_grammar): Likewise.
904 * src/print_graph.c: Likewise.
905
b7c49edf
AD
9062001-12-27 Akim Demaille <akim@epita.fr>
907
908 * src/main.c (main): If there are complains after grammar
909 reductions, then output the report anyway if requested, then die.
910 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
911 * src/reader.c (eoftoken): New.
912 (parse_token_decl): If the token being defined has value `0', it
913 is the eoftoken.
914 (packsymbols): No longer hack `tags' to insert `$' by hand.
915 Be sure to preserve the value of the eoftoken.
916 (reader): Make sure eoftoken is defined.
917 Initialize nsyms to 0: now eoftoken is created just like the others.
918 * src/print.c (print_grammar): Don't special case the eof token.
919 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
920 lie anyway, albeit pleasant.
921 * tests/calc.at: Exercise error messages with eoftoken.
922 Change the grammar so that empty input is invalid.
923 Adjust expectations.
924 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
925
ec2da99f
AD
9262001-12-27 Akim Demaille <akim@epita.fr>
927
928 * configure.in: Check the protos of strchr ans strspn.
929 Replace strchr if needed.
930 * src/system.h: Provide the protos of strchr, strspn and memchr if
931 missing.
932 * lib/strchr.c: New.
933 * src/reader.c (symbols_save): Use strchr.
934
8adfa272
AD
9352001-12-27 Akim Demaille <akim@epita.fr>
936
937 * src/print.c, src/print_graph.c (escape): New.
938 Use it to quote the TAGS outputs.
939 * src/print_graph.c (print_state): Now errors are in red, and
940 reductions in green.
941 Prefer high to wide: output the state number on a line of its own.
942
80dac38c
AD
9432001-12-27 Akim Demaille <akim@epita.fr>
944
945 * src/state.h, src/state.c (reductions_new): New.
946 * src/LR0.c (set_state_table): Let all the states have a
947 `reductions', even if reduced to 0.
948 (save_reductions): Adjust.
949 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
950 * src/print.c (print_reductions, print_actions): Adjust.
951 * src/output.c (action_row): Adjust.
952
2cec70b9
AD
9532001-12-27 Akim Demaille <akim@epita.fr>
954
955 * src/state.h, src/state.c (errs_new, errs_dup): New.
956 * src/LR0.c (set_state_table): Let all the states have an errs,
957 even if reduced to 0.
958 * src/print.c (print_errs, print_reductions): Adjust.
959 * src/output.c (output_actions, action_row): Adjust.
960 * src/conflicts.c (resolve_sr_conflict): Adjust.
961
13ca549a
AD
9622001-12-27 Akim Demaille <akim@epita.fr>
963
964 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
965
5092aba5
AD
9662001-12-27 Akim Demaille <akim@epita.fr>
967
968 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
969 * src/print.c: here.
970 (lookaheadset, shiftset): New, used as additional storage by
971 print_reductions.
972 (print_results): Adjust.
973 (print_shifts, print_gotos, print_errs): New, extracted from...
974 (print_actions): here.
975 * src/print_graph.c (print_actions): Remove dead code.
976
11e2beca
AD
9772001-12-27 Akim Demaille <akim@epita.fr>
978
979 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
980 `$n' and `@n'.
981
dac3c910
AD
9822001-12-27 Akim Demaille <akim@epita.fr>
983
984 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
985 (build_relations): Adjust.
986
d0b0fefa
AD
9872001-12-27 Akim Demaille <akim@epita.fr>
988
989 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
990 duplication.
991
adc8c848
AD
9922001-12-27 Akim Demaille <akim@epita.fr>
993
994 * src/reader.c (packgram): Catch nitems overflows.
995
14d293ac
AD
9962001-12-27 Akim Demaille <akim@epita.fr>
997
998 * src/files.c, src/files.h (guard_obstack): Remove.
999 * src/output.c (output): Adjust.
1000 * src/reader.c (parse_braces): New, factoring...
1001 (copy_action, copy_guard): these two which are renamed as...
1002 (parse_action, parse_guard): these.
1003 As a voluntary consequence, using braces around guards is now
1004 mandatory.
1005
f499b062
AD
10062001-12-27 Akim Demaille <akim@epita.fr>
1007
1008 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1009 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1010 members.
1011 (symbol_list_new): Adjust.
1012 (copy_action): action_line is the first line, not the last.
1013 (copy_guard): Just as for actions, store the `action' only, not
1014 the switch/case/break flesh.
1015 Don't parse the user action that might follow the guard, let...
1016 (readgram): do it, i.e., now, there can be an action after a
1017 guard.
1018 In other words the guard is just explicitly optional.
1019 (packgram): Adjust.
1020 * src/output.c (guards_output): New.
1021 (output_parser): Call it when needed.
1022 (output): Also free the guard and attrs obstacks.
1023 * src/files.c, src/files.h (obstack_save): Remove.
1024 (output_files): Remove.
1025 As a result, if one needs the former `.act' file, using an
1026 appropriate skeleton which requires actions and guards is now
1027 required.
1028 * src/main.c (main): Adjust.
1029 * tests/semantic.at: New.
1030 * tests/regression.at: Use `input.y' as input file name.
1031 Avoid 8+3 problems by requiring input.c when the test needs the
1032 parser.
1033
d945f5cd
AD
10342001-12-27 Akim Demaille <akim@epita.fr>
1035
1036 * src/reader.c (symbol_list_new): Be sure to initialize all the
1037 fields.
1038
d200e455
AD
10392001-12-27 Akim Demaille <akim@epita.fr>
1040
1041 All the hacks using a final pseudo state are now useless.
1042
1043 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1044 * src/lalr.c (nLA): New.
1045 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1046 instead of lookaheadsp from the pseudo state (nstate + 1).
1047
f9507c28
AD
10482001-12-27 Akim Demaille <akim@epita.fr>
1049
1050 * src/output.c (action_row, token_actions): Use a state_t instead
1051 of a integer, and nlookaheads instead of the following state's
1052 lookaheadsp.
1053
065fbd27
AD
10542001-12-27 Akim Demaille <akim@epita.fr>
1055
1056 * src/conflicts.c (log_resolution, flush_shift)
1057 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1058 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1059 (conflicts_print, print_reductions): Use a state_t instead of an
1060 integer when referring to a state.
1061 As much as possible, depend upon nlookaheads, instead of the
1062 `lookaheadsp' member of the following state (since lookaheads of
1063 successive states are successive, the difference between state n + 1
1064 and n served as the number of lookaheads for state n).
1065 * src/lalr.c (add_lookback_edge): Likewise.
1066 * src/print.c (print_core, print_actions, print_state)
1067 (print_results): Likewise.
1068 * src/print_graph.c (print_core, print_actions, print_state)
1069 (print_graph): Likewise.
1070 * src/conflicts.h: Adjust.
1071
1b177bd7
AD
10722001-12-27 Akim Demaille <akim@epita.fr>
1073
1074 * src/bison.hairy: Formatting/comment changes.
1075 ANSIfy.
1076 Remove `register' indications.
1077 Add plenty of `static'.
1078
7742ddeb
AD
10792001-12-27 Akim Demaille <akim@epita.fr>
1080
1081 * src/output.c (prepare): Drop the muscle `ntbase' which
1082 duplicates ntokens.
1083 * src/bison.simple: Formatting/comment changes.
1084 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1085 is an undocumented synonym.
1086
1fa14068
AD
10872001-12-22 Akim Demaille <akim@epita.fr>
1088
1089 * src/output.c (output_table_data): Change the prototype to use
1090 `int' for array ranges: some invocations do pass an int, not a
1091 short.
1092 Reported by Wayne Green.
1093
b9752825
AD
10942001-12-22 Akim Demaille <akim@epita.fr>
1095
1096 Some actions of web2c.y are improperly triggered.
1097 Reported by Mike Castle.
1098
1099 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1100 * tests/regression.at (Web2c): Rename as...
1101 (Web2c Report): this.
1102 (Web2c Actions): New.
1103
776209d6
AD
11042001-12-22 Akim Demaille <akim@epita.fr>
1105
1106 Reductions in web2c.y are improperly reported.
1107 Reported by Mike Castle.
1108
1109 * src/conflicts.c (print_reductions): Fix.
1110 * tests/regression.at (Web2c): New.
1111
275fc3ad
AD
11122001-12-18 Akim Demaille <akim@epita.fr>
1113
1114 Some host fail on `assert (!"foo")', which expands to
1115 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1116 Reported by Nelson Beebee.
1117
1118 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1119 `#define it_succeeded 0' and `assert (it_succeeded)'.
1120
897668ee
MA
11212001-12-17 Marc Autret <autret_m@epita.fr>
1122
1123 * src/bison.simple: Don't hard code the skeleton line and filename.
1124 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1125 New line counter 'skeleton_line' (skeleton-line muscle).
1126
ab3399e0
PE
11272001-12-17 Paul Eggert <eggert@twinsun.com>
1128
1129 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1130 YYDEBUG must be defined to a nonzero value.
1131
1132 * src/bison.simple (yytname): Do not assume that the user defines
1133 YYDEBUG to a properly parenthesized expression.
1134
3877f72b
AD
11352001-12-17 Akim Demaille <akim@epita.fr>
1136
1137 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1138 nlookaheads is a new member.
1139 Adjust all users.
1140 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1141 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1142 state.
776209d6 1143
331dbc1b
AD
11442001-12-17 Akim Demaille <akim@epita.fr>
1145
1146 * src/files.h, src/files.c (open_files, close_files): Remove.
1147 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1148 let...
1149 * src/reader.c (reader): Do it.
776209d6 1150
be750e4c
AD
11512001-12-17 Akim Demaille <akim@epita.fr>
1152
1153 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1154
709ae8c6
AD
11552001-12-17 Akim Demaille <akim@epita.fr>
1156
1157 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1158 (flush_reduce): New.
1159 (resolve_sr_conflict): Adjust.
776209d6 1160
f87685c3
AD
11612001-12-17 Akim Demaille <akim@epita.fr>
1162
1163 * src/output.c (output_obstack): Be static and rename as...
1164 (format_obstack): this, to avoid any confusion with files.c's
1165 output_obstack.
1166 * src/reader.h (muscle_obstack): Move to...
1167 * src/output.h: here, since it's defined in output.c.
1168
837491d8
AD
11692001-12-17 Akim Demaille <akim@epita.fr>
1170
1171 * src/output.c (action_row, save_column, default_goto)
1172 (sort_actions, matching_state, pack_vector): Better variable
1173 locality.
1174
796d61fb
AD
11752001-12-17 Akim Demaille <akim@epita.fr>
1176
1177 * src/output.c: Various formatting changes.
776209d6 1178
64d15509
AD
11792001-12-17 Akim Demaille <akim@epita.fr>
1180
1181 * src/files.c (output_files): Free the output_obstack.
1182 * src/main.c (main): Call print and print_graph conditionally.
1183 * src/print.c (print): Work unconditionally.
1184 * src/print_graph.c (print_graph): Work unconditionally.
1185 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1186
fbc8ecb7
MA
11872001-12-16 Marc Autret <autret_m@epita.fr>
1188
1189 * src/output.c (actions_output): Fix. When we use %no-lines,
1190 there is one less line per action.
1191
f0440388
MA
11922001-12-16 Marc Autret <autret_m@epita.fr>
1193
1194 * src/bison.simple: Remove a useless #line directive.
1195 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1196 * src/output.c (get_lines_number): New.
776209d6 1197 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1198 output muscles.
1199 Fix line numbering.
1200 (actions_output): Computes the number of lines taken by actions.
1201 (output_master_parser): Insert new skeleton which is the name of
1202 the output parser file name.
1203
a79986b8
MA
12042001-12-15 Marc Autret <autret_m@epita.fr>
1205
1206 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1207
4ec8e00f
MA
12082001-12-15 Marc Autret <autret_m@epita.fr>
1209
1210 * src/output.c (output_gram): Keep track of the hairy one.
1211
1a4648ff
AD
12122001-12-15 Akim Demaille <akim@epita.fr>
1213
1214 Make `make distcheck' work.
1215
1216 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1217 system.h which uses libgettext.h.
1218
9c2c67e6
AD
12192001-12-15 Akim Demaille <akim@epita.fr>
1220
1221 * src/nullable.c (set_nullable): Useless rules must be skipped,
1222 otherwise, since we range over their symbols, we might look at a
1223 nonterminal which no longer ``exists'', i.e., it is not counted in
1224 `nvars', hence we overflow our arrays.
1225
93ede233
AD
12262001-12-15 Akim Demaille <akim@epita.fr>
1227
1228 The header can also be produced directly, without any obstack!
1229 Yahoo!
1230
1231 * src/files.c, src/files.h (defines_obstack): Remove.
1232 (compute_header_macro): Global.
1233 (defines_obstack_save): Remove.
1234 * src/reader.c (parse_union_decl): No longer output to
1235 defines_obstack: its content can be found in the `stype' muscle
1236 anyway.
1237 (output_token_translations): Merge into...
1238 (symbols_output): this.
1239 Rename as...
1240 (symbols_save): this.
1241 (reader): Adjust.
1242 * src/output.c (header_output): New.
1243 (output): Call it.
1244
2666f928
AD
12452001-12-15 Akim Demaille <akim@epita.fr>
1246
1247 * src/reader.c (parse_union_decl): Instead of handling two obstack
1248 simultaneously, use one to define the `stype' muscle, and use the
1249 value of the latter to fill defines_obstack.
1250 (copy_comment): Remove.
1251 (copy_comment2): Work for a single obstack.
1252 Rename as...
1253 (copy_comment): this.
1254
428046f8
AD
12552001-12-15 Akim Demaille <akim@epita.fr>
1256
1257 * src/lex.c, src/lex.h (xgetc): No longer static.
1258 * src/reader.c (parse_union_decl): Revamp.
1259
ea52d706
AD
12602001-12-15 Akim Demaille <akim@epita.fr>
1261
1262 Still making progress in separating Bison into (i) input, (ii)
1263 process, (iii) output: now we can directly output the parser file
1264 without using table_obstack at all.
1265
1266 * src/files.c, src/files.h (table_obstack): Bye bye.
1267 (parser_file_name): New.
1268 * src/files.c (compute_output_file_names): Compute it.
1269 * src/output.c (actions_output, output_parser)
1270 (output_master_parser): To a file instead of an obstack.
1271
3f96f4dc
AD
12722001-12-15 Akim Demaille <akim@epita.fr>
1273
1274 Attach actions to rules, instead of pre-outputting them to
1275 actions_obstack.
1276
1277 * src/gram.h (rule_t): action and action_line are new members.
1278 * src/reader.c (symbol_list): Likewise.
1279 (copy_action): Save the actions within the rule.
1280 (packgram): Save them in rule_table.
1281 * src/output.c (actions_output): New.
1282 (output_parser): Use it on `%%actions'.
1283 (output_rule_data): Don't free rule_table.
1284 (output): Do it.
1285 (prepare): Don't save the `action' muscle.
1286 * src/bison.simple: s/%%action/%%actions/.
1287
51576fb3
AD
12882001-12-15 Akim Demaille <akim@epita.fr>
1289
1290 * src/reader.c (copy_action): When --yacc, don't append a `;'
1291 to the user action: let it fail if lacking.
dee049eb 1292 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1293
2648a72d
AD
12942001-12-14 Akim Demaille <akim@epita.fr>
1295
1296 * src/lex.c (literalchar): Simply return the char you decoded, non
1297 longer mess around with obstacks and int pointers.
1298 Adjust all callers.
1299
92790e5b
AD
13002001-12-14 Akim Demaille <akim@epita.fr>
1301
1302 * src/lex.c (literalchar): Don't escape the special characters,
1303 just decode them, and keep them as char (before, eol was output as
1304 the 2 char string `\n' etc.).
1305 * src/output.c (output_rule_data): Use quotearg to output the
1306 token strings.
1307
927c1557
PE
13082001-12-13 Paul Eggert <eggert@twinsun.com>
1309
1310 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1311 Do not infringe on the global user namespace when using C++.
1312 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1313 All uses of `fprintf' and `stderr' changed.
1314
1315 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1316
ed8e1f68
AD
13172001-12-13 Akim Demaille <akim@epita.fr>
1318
1319 The computation of nullable is broken: it doesn't handle empty
1320 RHS's properly.
1321
1322 * tests/torture.at (GNU AWK Grammar): New.
1323 * tests/sets.at (Nullable): New.
1324 * src/nullable.c (set_nullable): Instead of blindly looping over
1325 `ritems', loop over the rules, and then over their rhs's.
1326
1327 Work around Autotest bugs.
1328
1329 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1330 frame, because Autotest understand lines starting with a `+' as
1331 traces from the shell. Then, they are not processed properly.
1332 Admittedly an Autotest bug, but we don't have time to wait for
1333 Autotest to catch up.
1334 * tests/regression.at (Broken Closure): Adjust to the new table
1335 frames.
1336 Move to...
1337 * tests/sets.at: here.
1338
cb581495
AD
13392001-12-13 Akim Demaille <akim@epita.fr>
1340
1341 * src/closure.c (closure): Use nrules instead of playing tricks
1342 with BITS_PER_WORD.
1343
2e729273
AD
13442001-12-13 Akim Demaille <akim@epita.fr>
1345
1346 * src/print.c (print_actions): Output the handling of `$' as the
1347 traces do: shifting the token EOF. Before EOF was treated as a
1348 nonterminal.
1349 * tests/regression.at: Adjust some tests.
1350 * src/print_graph.c (print_core): Complete the set of items via
1351 closure. The next-to-final and final states are still unsatisfying,
1352 but that's to be addressed elsewhere.
1353 No longer output the rule numbers, but do output the state number.
1354 A single loop for the shifts + gotos is enough, but picked a
1355 distinct color for each.
1356 (print_graph): Initialize and finalize closure.
1357
107f7dfb
AD
13582001-12-13 Akim Demaille <akim@epita.fr>
1359
1360 * src/reader.c (readgram): Remove dead code, an strip useless
1361 braces.
1362 (get_type): Remove, unused.
1363
9b53a24f
AD
13642001-12-12 Akim Demaille <akim@epita.fr>
1365
1366 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1367 on that of lib/error.c.
1368
dbfb6dcd
AD
13692001-12-12 Akim Demaille <akim@epita.fr>
1370
1371 Some hosts don't like `/' in includes.
1372
1373 * src/system.h: Include libgettext.h without qualifying the path.
1374 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1375 $(top_srcdir).
1376
c25fb648
MA
13772001-12-11 Marc Autret <autret_m@epita.fr>
1378
1379 * src/output.c (output_parser): Remove useless muscle.
1380
710ddc4f
MA
13812001-12-11 Marc Autret <autret_m@epita.fr>
1382
1383 * src/bison.simple: Remove #line just before %%epilogue. It
1384 is now handled in ...
1385 * src/reader.c (read_additionnal_code): Add the output of a
1386 #line for the epilogue.
1387
e83d80b8
MA
13882001-12-10 Marc Autret <autret_m@epita.fr>
1389
927c1557 1390 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1391 replace precedent remove.
1392 * src/bison.simple: Remove #line before %%prologue because
1393 %%input-line is wrong at this time.
1394
971d5158
MA
13952001-12-10 Marc Autret <autret_m@epita.fr>
1396
1397 * src/reader.c (symbols_output): Clean up.
927c1557 1398 * src/output.c (output_gram, output): Clean up.
971d5158 1399
5edafffd
AD
14002001-12-10 Akim Demaille <akim@epita.fr>
1401
1402 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1403 * src/LR0.c (set_state_table): here.
1404 * src/lalr.c (lalr): Call it.
1405
0279f8e9
AD
14062001-12-10 Akim Demaille <akim@epita.fr>
1407
1408 * src/state.h (shifts): Remove the `number' member: shifts are
1409 attached to state, hence no longer need to be labelled with a
1410 state number.
1411
190c4f5f
AD
14122001-12-10 Akim Demaille <akim@epita.fr>
1413
1414 Now that states have a complete set of members, the linked list of
1415 shifts is useless: just fill directly the state's shifts member.
1416
1417 * src/state.h (shifts): Remove the `next' member.
1418 * src/LR0.c (first_state, last_state): Remove.
1419 Adjust the callers.
1420 (augment_automaton): Don't look for the shifts that must be added
1421 a shift on EOF: it is those of the state we looked for! But now,
1422 since shifts are attached, it is no longer needed to looking
1423 merely by its id: its number.
1424
2a73b93d
AD
14252001-12-10 Akim Demaille <akim@epita.fr>
1426
1427 * src/LR0.c (augment_automaton): Better variable locality.
1428 Remove an impossible branch: if there is a state corresponding to
1429 the start symbol being shifted, then there is shift for the start
1430 symbol from the initial state.
1431
74392f6a
AD
14322001-12-10 Akim Demaille <akim@epita.fr>
1433
1434 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1435 only when appropriate: when insert_start_shifting_state' is not
1436 invoked.
1437 * tests/regression.at (Rule Line Numbers): Adjust.
1438
37c82725
AD
14392001-12-10 Akim Demaille <akim@epita.fr>
1440
1441 * src/LR0.c (augment_automaton): Now that all states have shifts,
1442 merge the two cases addition shifts to the initial state.
1443
6a164e0c
AD
14442001-12-10 Akim Demaille <akim@epita.fr>
1445
1446 * src/lalr.c (set_state_table): Move to...
1447 * src/LR0.c: here.
1448 * src/lalr.c (lalr): Don't call it...
1449 * src/LR0.c (generate_states): do it.
1450 * src/LR0.h (first_state): Remove, only the table is used.
1451
7215de24
AD
14522001-12-10 Akim Demaille <akim@epita.fr>
1453
1454 * src/LR0.h (first_shift, first_reduction): Remove.
1455 * src/lalr.c: Don't use first_shift: find shifts through the
1456 states.
1457
80e25d4d
AD
14582001-12-10 Akim Demaille <akim@epita.fr>
1459
1460 * src/LR0.c: Attach shifts to states as soon as they are
1461 computed.
1462 * src/lalr.c (set_state_table): Instead of assigning shifts to
1463 state, just assert that the mapping was properly done.
1464
0ab3728b
AD
14652001-12-10 Akim Demaille <akim@epita.fr>
1466
1467 * src/LR0.c (insert_start_shift): Rename as...
1468 (insert_start_shifting_state): this.
1469 (insert_eof_shifting_state, insert_accepting_state): New.
1470 (augment_automaton): Adjust.
1471 Better locality of the variables.
1472 When looking if the start_symbol is shifted from the initial
1473 state, using `while (... symbol != start_symbol ...)' sounds
1474 better than `while (... symbol < start_symbol ...)': If fail
1475 to see how the order between symbols could be relevant!
1476
78af9bbc
AD
14772001-12-10 Akim Demaille <akim@epita.fr>
1478
1479 * src/getargs.h: Don't declare `spec_name_prefix' and
1480 `spec_file_prefix', declared by src/files.h.
1481 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1482 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1483 * src/output.c (prepare): Adjust.
1484 * src/reader.c (symbols_output): Likewise.
1485 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1486
bdef2a41
AD
14872001-12-10 Akim Demaille <akim@epita.fr>
1488
1489 * src/muscle_tab.c (muscle_init): NULL is a better default than
1490 `"0"'.
1491
3735969c
AD
14922001-12-10 Akim Demaille <akim@epita.fr>
1493
1494 * src/reader.c (reader): Calling symbols_output once is enough.
1495
49701457
AD
14962001-12-10 Akim Demaille <akim@epita.fr>
1497
1498 Now that states have a complete set of members, the linked list of
1499 reductions is useless: just fill directly the state's reductions
1500 member.
1501
1502 * src/state.h (struct reductions): Remove member `number' and
1503 `next'.
1504 * src/LR0.c (first_reduction, last_reduction): Remove.
1505 (save_reductions): Don't link the new reductions, store them in
1506 this_state.
1507 * src/lalr.c (set_state_table): No need to attach reductions to
1508 states, it's already done.
1509 * src/output.c (output_actions): No longer free the shifts, then
1510 the reductions, then the states: free all the states and their
1511 members.
1512
0edad749
AD
15132001-12-10 Akim Demaille <akim@epita.fr>
1514
1515 * src/options.c (OPTN, DRTV, BOTH): New.
1516 (option_table): Use them.
1517
0edad749
AD
1518 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1519 the job of system.h.
1520 * src/options.c: Don't include stdio.h and xalloc.h for the same
1521 reasons.
1522
5449dd0f
AD
15232001-12-10 Akim Demaille <akim@epita.fr>
1524
1525 * src/output.c (output, prepare): Make sure the values of the
1526 muscles `action' and `prologue' are 0-terminated.
1527
a870c567
AD
15282001-12-10 Akim Demaille <akim@epita.fr>
1529
1530 Clean up GCC warnings.
1531
1532 * src/reader.c (copy_action): `buf' is not used.
1533 (parse_skel_decl): Be static.
1534 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1535 * src/options.h (create_long_option_table): Have a real prototype.
1536 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1537 (hash_delete_at): Return const void *.
1538 Adjust casts to preserve the const.
1539
80df8768
AD
15402001-12-10 Akim Demaille <akim@epita.fr>
1541
1542 * configure.in: Require 2.52g.
1543 M4 is not needed, but AUTOM4TE is.
1544 * m4/m4.m4: Remove.
1545 * tests/Makefile.am: Adjust.
1546
f693ad14
AD
15472001-12-10 Akim Demaille <akim@epita.fr>
1548
1549 One structure for states is enough, even though theoretically
1550 there are LR(0) states and LALR(1) states.
1551
1552 * src/lalr.h (state_t): Remove.
1553 (state_table): Be state_t **, not state_t *.
1554 * src/state.h (core, CORE_ALLOC): Rename as...
1555 (state_t, STATE_ALLOC): this.
1556 Add the LALR(1) members: shifts, reductions, errs.
1557 * src/LR0.c (state_table): Rename as...
1558 (state_hash): this, to avoid name clashes with the global
1559 `state_table'.
1560 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1561 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1562
74ffbcb6
AD
15632001-12-10 Akim Demaille <akim@epita.fr>
1564
1565 Bison dumps core on bash.y.
1566 Reported by Pascal Bart.
1567
1568 * src/warshall.c (bitmatrix_print): New.
1569 (TC): Use it.
1570 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1571 j must be the outer loop.
1572 * tests/regression.at (Broken Closure): New.
1573
07708e19
AD
15742001-12-05 Akim Demaille <akim@epita.fr>
1575
1576 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1577 its argument.
1578