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